Can you select a node by name using env() ? #2319
-
Hi there, I am just beginning to learn So for example if I want a node named
but this does not:
this does not work either:
I am sorry, I don't see how to do this, is it possible without resorting to the shell string interpolation? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I found one way to achieve this, but it still seems unnecessarily verbose:
|
Beta Was this translation helpful? Give feedback.
-
You were pretty close. It is possible using the dynamic keys syntax. target=catpants yq '.[env(target)]' example.yaml |
Beta Was this translation helpful? Give feedback.
You were pretty close. It is possible using the dynamic keys syntax.
target=catpants yq '.[env(target)]' example.yaml