Skip to main content
-n command-line option
Source Link
peak
  • 119.1k
  • 21
  • 185
  • 218

AnotherAn alternative to slurping using the -s command-line option is to use the inputs variablefilter. Like so jq '[inputs] | add':

jq -n '[inputs] | add' 

This will produce an object with all the input objects combined.

Another alternative to slurping is to use the inputs variable. Like so jq '[inputs] | add' will produce an object with all the input objects combined.

An alternative to slurping using the -s command-line option is to use the inputs filter. Like so:

jq -n '[inputs] | add' 

This will produce an object with all the input objects combined.

Source Link
Evgeny Zislis
  • 7k
  • 5
  • 63
  • 65

Another alternative to slurping is to use the inputs variable. Like so jq '[inputs] | add' will produce an object with all the input objects combined.