Repository navigation
Can you select a node by name using env() ? #2319
Answered
by
fearphage
Gullumluvl
asked this question in
Q&A
|
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! |
Answered by
fearphage
Mar 19, 2025
Replies: 2 comments 1 reply
|
I found one way to achieve this, but it still seems unnecessarily verbose: |
0 replies
|
You were pretty close. It is possible using the dynamic keys syntax. target=catpants yq '.[env(target)]' example.yaml |
1 reply
Answer selected by
mikefarah
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You were pretty close. It is possible using the dynamic keys syntax.
target=catpants yq '.[env(target)]' example.yaml