I use yaml.macro which in turn uses js-yaml.
For the most part it works, but I want it to perform a similar translation that Spring performs on dotted paths for example
Abc.Def: foo
should translate to
{ "Abc": { "Def": "foo" } }
As of now the translation goes
{ "Abc.Def": "foo" } }
What I am thinking of is a reduction function that I can pass to Object.entries(x).reduce( ) that does a recursive reduce call to do further merges.
Similar to Create objects dynamically out of a dot notation like string and Convert a JavaScript string in dot notation into an object reference but I need it to work in the situations where not all the data does the mixing. So not just a single entry.
Abc.Def: foo
Ghi:
Jkl: bar
Mno.Pqr: baz