How to merge 2 or more json files into one array for all using terminal? Use jq!
Navigate to the directory, and run this jq command.
jq -s '[.]'*.json > manifest.json
-s option will return an array containing the contents of the input JSON files, which, in your case, are also arrays. This means that you need to spread (
…) two array levels, and collect (
[…]) the result.
Looking for more information on how to use jq? Try the
jq tag on StackOverflow