-
I'm moving my project git-replay from yq v3 to v4, and am having trouble finding the correct new syntax for two things. Working with a file like # myfile.yaml
array_1:
array_2:
- array_element_1
- array_element_2 in v3 I would use yq d myfile.yaml array_1.array_2.array_element_1 to delete yq w myfile.yaml "array_1.array_2[+]" array_element_3 to add What's the best v4 approach? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Mar 1, 2021
Replies: 1 comment 3 replies
-
https://mikefarah.gitbook.io/yq/operators/delete#delete-nested-entry-in-array https://mikefarah.gitbook.io/yq/operators/add#add-string-to-array |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
olets
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://mikefarah.gitbook.io/yq/operators/delete#delete-nested-entry-in-array
https://mikefarah.gitbook.io/yq/operators/add#add-string-to-array