Replies: 1 comment 1 reply
-
Can you please provide an example of the output you want - I'm a little confused |
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
-
Hello,
I have a very big YAML like this format:
I want to select by team but maintain the yaml estructure,
I have tried this:
yq eval 'select(.[].[].[].team == "Windows")' test.yaml
but it shows all items,
by this way:
yq eval '.[].[].[] | select(.team == "Windows")' test.yml
is working, but i lost the yaml estructure of the main file, it only outputs the final properties.
Is there any way to do this using the same YAML structure as the main file?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions