Support for YAML dictionaries as nested properties

Use case or problem

The more front matter properties become mainstream, and Bases become more useful, the more it makes sense to add more and more properties to notes (like daily notes). However, this very quickly becomes very verbose, with many related properties in a flat list.

For example, I added sleep data to daily notes, and now I have properties like sleep_wakeup_time, sleep_bedtime, sleep_score and sleep_duration. Adding more metadata leads to a long list that is cluttered and hard to navigate.

Proposed solution

It would very useful if properties would allow nesting, i.e. properties that are a YAML dictionary:

sleep:
  wakeup_time: 05:50
  bedtime: 22:40
  duration: ...

Right now, YAML dictionaries are shown by Obsidian as flat strings, which makes them difficult to interact with.

Supporting YAML dictionaries should include:

  1. Visual support in the property editor.
  2. Syntax support in bases to address nested properties, e.g. sleep.wakeup_time.

This would be an incredible expansion to what can be done and represented with properties without causing massive clutter.

Current workaround (optional)

A possible workaround is to split related properties to different notes, e.g. to accompany a daily note with a daily sleep data note, or just a data note. But:

  1. It’s much more cumbersome in so many ways (including the queries needed in bases to support this mechanism all around),
  2. Even with patterns like this one, supporting YAML dictionaries as properties is incredibly more expressive.

2 Likes

This seems like a duplicate of

best option at the moment is change your “properties in document” mode to source

Missed it in spite of searching if it already existed, thank you.

1 Like