-
data:
values: |
foo: bar
john: 42 I can merge yq e '.data.values' file1.yaml | yq ea 'select(fi==1) * select(fi==0)' file2.yaml - Which outputs this: john: 42
foo: bar But I'm wondering if this is possible with just calling yq once, e.g. something like this: yq ea 'select(fi==0).data.values * select(fi==1)' file1.yaml file2.yaml |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Jul 20, 2021
Replies: 1 comment
-
Yeah the issue is that data.values is actually a string block, as denoted by the '|' - the contents of which happens to be a (now) string encoded yaml file. Running once to extract and then again to process makes sense |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mikefarah
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah the issue is that data.values is actually a string block, as denoted by the '|' - the contents of which happens to be a (now) string encoded yaml file.
Running once to extract and then again to process makes sense