#3587·jq

feature: add `/?` operator

Author: A4-TacksCreated Jul 19, 2026Updated Jul 19, 2026

I uses jq calc jq '.[]/input[]', but input contains 0

If I use jq '(.[]/input[])?', iterate well breaking at 0 input

So I use jq '{a:.[],b:input[]}|(.a/.b)?'

I hope jq with /? operator, in $a /? $b

Some possible implement:

  • if $b by zero, output empty
  • if $a / $b throws exception, output empty