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 array_element_1 and
yq w myfile.yaml "array_1.array_2[+]" array_element_3
to add array_element_3.
What's the best v4 approach? Thanks!
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
in v3 I would use
to delete
array_element_1andyq w myfile.yaml "array_1.array_2[+]" array_element_3to add
array_element_3.What's the best v4 approach? Thanks!