Skip to content

Add object containing double quotes to array #787

Answered by mikefarah
don-attilio asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the delay, best way I could think of doing it is with an environment variable:

VAL='variable2 == "string2"' ./yq e '.a.b += {"e2": strenv(VAL)} | .. style="single"' data.yaml

Replies: 1 comment 2 replies

Comment options

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

@don-attilio
Comment options

Answer selected by don-attilio
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