I have two JSON objects in two files (result_0.json and result_1.json) which look like this
{ "data": { "pools": [ { "id": "1" }, { "id": "2" } ] } } and like this:
{ "data": { "pools": [ { "id": "3" }, { "id": "4" } ] } } What I would like to get looks like this:
{ "data": { "pools": [ { "id": "1" }, { "id": "2" }, { "id": "3" }, { "id": "4" } ] } } How can it be done? I tried
jq -s add result_0.json result_1.json but it just overwrites the values in result_0.json with the values of result_1.json.