jaq
jaq copied to clipboard
Add `?//` (Destructuring Alternative Operator) support
$ jq -n '{x:1} as [$x] ?// {$x} | $x'
1
$ jaq -n '{x:1} as [$x] ?// {$x} | $x'
Error: expected |
╭─[<inline>]
│
1 │ {x:1} as [$x] ?// {$x} | $x
┆ ┬
┆ │
┆ ╰───────────── unexpected token
──╯
Yes, adding this would be nice, but it's probably quite hard and not really on my roadmap.