What I’m trying to do
I’ve been writing notes about contact infomation.So I create an Object that includes differents kinds of contact methods as keys in the Frontmatter.
Since there is no promise that everyone has the same contact methods accesible to them,there might be some keys in the Contact object I’ve created.
When I do the Query with Dataview,the keys will show up with a value of null(or any string I set in the Dataview settings.)And that makes the TABLE look messy in the view mode.
So what I’m trying to do is find a way to exclude any key in Object from Frontmatter that holds null value from being shown in the Dataview TABLE.
Things I have tried
I figured that the simplest way to achieve this goal is just deleting the keys if there is no value for it.
But I’m just trying to maintain the structure of Frontmatter for every related note.
Here’s an example of my Frontmatter:
Note: SOMEBODY’S NAME
Name: Somebody
Contact:
{Email: [email protected],
Landline: 123456789,
Tel: 123456789,
Web: ,
Skype: ,
Whatsapp: }
And an example of my Query:
Table WITHOUT ID this.Name AS Name,Contact
WHERE file.name = this.file.name
Here’s the images for the example:
Kindly share any solution with me.Many thanks in advance.