I have input like this:
{ "prop": ["apple", "banana"] }{ "prop": ["kiwi", "banana"] }{ "prop": ["cherry", "orange"] }How do I print objects where prop contains at least one of kiwi and orange?
(The list of interesting values is longer than just 2, so I'd like to leverage the any function somehow.)
I've tried the following
jq 'select(any(.prop[] | contains(["kiwi", "orange"])))'< input.jsonand various variants of the above, but can't figure out the right expressions.