jq
jq copied to clipboard
Add mul/0 builtin filter folding arrays with * similar to add/0 for +
https://github.com/jqlang/jq/blob/913b26469f47351a9f75a1bc4145f45421115e37/ChangeLog#L826-L829
Hi,
when you add multiple files you can do either jq -s '.[0] + .[1] + .[2]' file0.json file1.json file2.json
or jq -s 'add' *.json
can we have a similar syntax for jq -s '.[0] * .[1] * .[2]' file0.json file1.json file2.json
?
Could maybe be: jq -s 'multiply' *.json
Thanks