2 ms·
jq 'reduce .[] as $obj ({}; .+$obj)' or jq -s 'reduce .[] as $obj ({}; .+$obj)' should do it. `+` adds objects by merging them.
by cryptonector 12y ago
jq 'reduce .[] as $obj ({}; .+$obj)'
or
jq -s 'reduce .[] as $obj ({}; .+$obj)'
should do it. `+` adds objects by merging them.
- kolev 12y agoThanks! I'm eager to try this and hopefully clean up my code!