Replies: 1 comment 1 reply
-
Use $ echo '{"foo":[10],"bar":[20],"baz":[10,20],"qux":[30],"quux":[]}' |
jq -c 'map_values(select(contains(10,20 | [.])))'
{"foo":[10],"bar":[20],"baz":[10,20]} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
E.g: here's the sample:
How do I filter or select the element which contains any of
["864470934383755334", "1166746717656465448"]
?The output should be:
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions