Skip to content

yq e '.container | del(.field)' - doesn't work as I expect #790

Answered by mikefarah
pmorch asked this question in Q&A
Discussion options

You must be logged in to vote

You're not doing anything wrong - you've found a bug in delete! I think I see what the cause is - and wonder how it hasn't been noticed yet!

Regardless, I'll have a fix out as soon as I can, until then you can do the following:

yq e 'del(.container.field) | .container' test.yaml

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mikefarah
Comment options

@mikefarah
Comment options

Answer selected by mikefarah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants