Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 610

Replace nested object with an object from another file in JQ

$
0
0

I have a json file that has the following structures

{"a":"aval","b":{},"c":"cval"}

I have another json file with following content

{"b1":"b1val","b2":"b2val"}

I want to shove the json object from file 2 into "b" from file 1

{"a":"aval","b":{"b1":"b1val","b2":"b2val"  },"c":"cval"}

how do i do this with JQ


Viewing all articles
Browse latest Browse all 610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>