Rename key
#741
-
Using yq V4, how to rename a key in a yaml document? For example, I have the following document: a:
b:
c: "lorem ipsum" I would like to rename a:
foo:
c: "lorem ipsum" I've looked around in the docs but I wasn't able to find any operator to accomplish that. Is this feasible? |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Mar 1, 2021
Replies: 1 comment 1 reply
-
Without being at my pc with yq - the best way I think this would work is something like:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sylvainbx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Without being at my pc with yq - the best way I think this would work is something like: