I have a json object of the form:
{
...
objectx: {
nested_obj1: {
key1: value1
},
nested_obj2: {
key2: value2
},
...
},
...
}
. I need to add a keyX: valueX to all the nested_objs in objectx using jq.
I was trying to apply a map filter using .objectx | map(.+{keyX: valueX}) but could not figure out how to store this filtered list into the original json object. How can I achieve this?