Merge arbitrary number of json files
Sometimes you need to merge an arbitrary amount of json files. For example, simplecov reports for Ruby application.
jq -s 'reduce .[] as $item ({}; . * $item)' *.json .*.json > r.txt
Sometimes you need to merge an arbitrary amount of json files. For example, simplecov reports for Ruby application.
jq -s 'reduce .[] as $item ({}; . * $item)' *.json .*.json > r.txt