-
Hi! In yq v3, I used to be able to do set values to keys dynamically, something like
Is this still possible with yq v4? I couldn't figure out a way to do it. The |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Mar 30, 2021
Replies: 1 comment 1 reply
-
Yep, you can do it using interpolation in your shell like you've done, or via the env operator documented here: https://mikefarah.gitbook.io/yq/operators/env-variable-operators#dynamic-key-lookup-with-environment-variable Env operator is useful just because it sidesteps escaping and quoting issues in shells |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mudideng
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, you can do it using interpolation in your shell like you've done, or via the env operator documented here: https://mikefarah.gitbook.io/yq/operators/env-variable-operators#dynamic-key-lookup-with-environment-variable
Env operator is useful just because it sidesteps escaping and quoting issues in shells