Use case or problem
We need to be able to support multi-level YAML. Especially for Dataview users
---
parent:
- child1:
- grandchild1: 1
- grandchild2: 2
- child2:
- grandchild3: 3
- grandchild4: 4
---
We need to be able to support multi-level YAML. Especially for Dataview users
---
parent:
- child1:
- grandchild1: 1
- grandchild2: 2
- child2:
- grandchild3: 3
- grandchild4: 4
---
+1 most of my yaml is nested, for example:
book:
started: <% tp.file.creation_date("YYYY-MM-DD") %>
finished:
format: Digital
status: Reading
title: [""]
authors: [""]
tags: [""]
ISBN:
+1 here, too
I use nested properties similar to above, to group a selection of related properties;
category:
area: work
company: company1
client: client1
project: project1
+1 from me too. I use nested YAML across the vault.
Same, I use nested YAML for several things, they work with Dataview, and switching to source view to edit them is not ideal.
+1 I use nested properties loads in my notes - particularly the TTRPG related ones.
The usability with Dataview is notable, but there are also plugins like Fantasy Calendar that relies on nested YAML.
I have reported this as a bug. Two weeks ago, nested attributes were fully supported. Now they are broken. Cannot edit nested properties in Preview mode
Would be good if the below worked as well:
urls:
youtube:
first: https://....
second: https://....
website: https://....
Unfortunately, after reporting this as a bug, I inadvertently accepted an answer for it and it then got put in the âresolved bugsâ graveyard. Derp derp!
So, if others would like this followed up on, perhaps you can bring it up in the bug reports; I donât want to wear out my welcome on this topic.
Cheers.
I did not understand what you mean by âwork using maps.â Can you explain? Thanks.
Adding my voice to this feature request, I too use nesting to structure my frontmatter
Objects, i.e., key-value pairs, in addition to just lists.
+1 for me too
Adding my voice as well â while I can manually format a property as an object in source view, my dataview tables and filtered graph views really shine with nested property values.
+1 from me for support for nested properties
+1 for me too⌠most of my front matter are nested.
i asked on Discord abt this & they directed me here
Suggestion â
How about âflatteningâ nested properties by using a dot â.â as separator? This would make the naming consistent with what one would see if they had previously used Dataview to display nested fields without a column name alias.
For example, with the following YAML:
book:
finished: 2023-09-01
format: Digital
status: Reading
The new Properties editor could display it as:
book.started: 2023-09-01
book.format: Digital
book.status: Reading
I think this would be an improvement over the current approach, which displays it in JSON format:
book: {"started": "2023-09-01", "format": "Digital", "status": "Reading"}
+1 from me on this. I organize a lot of my notes with nested links off to external resources that they relate to.
I tried this approach by manually introducing the dot notation in my YAML. But it didnât play well with Dataview for some reason, not even allowing the fully nested key.
The best approach would be an expandable nested list but until then editing in source is the only way there is.