farling42 / obsidian-import-json

Plug-in for Obsidian.md which will create Notes from JSON files
MIT License
85 stars 5 forks source link

Iterate over all fields in the named JSON array. #37

Closed farling42 closed 1 year ago

farling42 commented 1 year ago

Some json files have an object with multiple named entries, each containing the same structure, instead of an array.

Provide an option to have each field treated as a separate element in an array.

But we have to still support users who want to name the SINGLE object to be processed.

farling42 commented 1 year ago

Object.values will work on an object too.

So we only need a switch to prevent doing topobj = [ topobj]

farling42 commented 1 year ago

Implemented in 0.27.0

If the new field is selected then the named toplevel field in the JSON file will have a separate note created for each subfield.

The name of the subfield can be accessed using {{SourceIndex}}