Need to combine and merge the data of two json files? Use this jq command line snippet to combine and merge two sets of json data into a new json file.
1 |
jq -s 'flatten | map(reduce .[] as $x ({}; . * $x))' file-1.json file-2.json > new-file-combining-both-datasets.json |