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
$bby zero, outputempty - if
$a / $bthrows exception, outputempty
Source: jqlang/jq