echo '[1,2,3]' | jq 'reduce .[] as $x (0; if $x >= 2 then . + $x else . end)' #=> 5

Reply to this note

Please Login to reply.

Discussion

No replies yet.