Use or
with contains
#1356
Unanswered
julianbarg
asked this question in
Q&A
Replies: 1 comment
-
Not sure what you mean by primary array, but: yq '.[] | select( (.irrelevant | contains(["h"]) or (.irrelevant | contains(["a"])) ))' file.yaml
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Say I have a file foo.yaml:
I want to select all entries in the primary array that contain in the tag array either the value "a" or "h" (or both). How do I go about this?
Beta Was this translation helpful? Give feedback.
All reactions