Not able to query nested YAML for heatmap calendar

What I’m trying to do

I am not able to get heatmap calendars to work when querying nested YAML information.

This is my frontmatter

This is the query

Things I have tried

I searched in the help docs and only found posts about nested links. I have tried adding quotation marks and brackets to my YAML frontmatter and I still wasn’t able to get the query to work. I also went to the github repository and copied/pasted an example that the author provided that uses nested information, and it didn’t work on my vault. Could this be the fault of the plugin itself? (although the heat map calendar works perfectly well with non-nested frontmatter)

Many thanks!

Could you do a `$= dv.span( dv.current())` in the file with the metadata and screenshot the area with the frontmatter data?

That little snippet is very useful to verify that the frontmatter is properly formatted, and understandable for dataview.

It could also be helpful to do a console.log(page.food.smoothie), and check the console output that it actually lists what you expect it to.

Thank you so much for responding! I tried your first suggestion (with the help of ChatGPT haha) and I saw that the front matter was invalid. Turns out, you can’t indent YAML front matter using the tab button; instead, you must indent using spaces (apparently two spaces is the convention).
Thank you :hearts: :hearts: :hearts: :hearts: :hearts: :hearts: :hearts: :hearts:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.