The input is
{"zoo": [ { "x": { "guesst": "" } }, { "y": { "guesst": "zebra" } } ]}
And i need the output like
{"zoo": [ { "x": { "guesst": "zebra" } }, { "y": { "guesst": "zebra" } } ]}
I did:
jq '.zoo[0].x.guesst = .zoo[1].y.guesst'
But, what if i do not know the order of the objects in the array?