Why the otherwise excellent #JSON parser #jq *requires* a else in if-then tests?
@bortzmeyer @bortzmeyer Are you looking for "not A // B"?
@kmk I wanted to map a function "if COND then SOMETHING [else NOTHING]" on an array. But I have to provide a else even if pointless.
@bortzmeyer Then it looks like #jq has the "select" operator for that.
@kmk Yes, and it is great:
% echo '[1, 5, 6, 7]' | jq '. | select(.>5)' 67