Skip to content

How to append element to first? #1467

Answered by mikefarah
kebhr asked this question in Q&A

You must be logged in to vote

Try:

yq '.list = ["a"] + .list' sample.yaml

Replies: 2 comments 1 reply

You must be logged in to vote
0 replies

You must be logged in to vote
1 reply
@kebhr

Answer selected by kebhr
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