Add a map to a document #1801
Unanswered
lucabalsanelli
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi, document='aaa: hello
bbb: world
ccc: foo'
yq '. += {"fff": "bar"}' <<<"$document" outputs aaa: hello
bbb: world
ccc: foo
fff: bar |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I want to add a map (which maps a string to another string, e.g.
fff: bar
) to the followingso I'm using
but I get Error: 1:10: invalid input text "fff: bar}".
If I add a map of numbers, it works
outputs
What am I missing?
Thanks,
Luca
Beta Was this translation helpful? Give feedback.
All reactions