Considering this
{ "some": "property", "nested": { "hello": "world" } }
I want to get this result using jq
{ "some": "property", "nested": { "hello": "world", "freshly": "added" } }
So how can I add the field just added? I don’t know how many properties are at the root level (and I want to save them all), I only know the name of the nested object (here “nested”), the name of the property that I would like to add (here “fresh”) and its value.
source share