I'm using the jq tools (jq-json-processor) in shell script to parse json.
I've got 2 json files and want to merge them into one unique file
Here the content of files:
file1:
{"tag_id" : ["t1"], "inst_id" : "s1"} {"tag_id" : ["t1"], "inst_id" : "s2"} file2:
{"tag_id" : ["t2"], "inst_id" : "s1"} {"tag_id" : ["t2"], "inst_id" : "s2"} {"tag_id" : ["t2"], "inst_id" : "s3"} expected result:
{"tag_id" : ["t1","t2"], "inst_id" : "s1"} {"tag_id" : ["t1","t2"], "inst_id" : "s2"} {"tag_id" : ["t2"], "inst_id" : "s3"}