-
Hi all,
and a Yaml snipet like this other (
I want to obtain an output document joining these two YAMLs, adding the snipet under
I've tried in this way:
but in output I got this:
not what I expected. Why is that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
A couple of things going on here.
To get the results you want, iterate through |
Beta Was this translation helpful? Give feedback.
A couple of things going on here.
newStaff
document with the value oflev2
.add()
method only adds one value to the collection, so in this case you're adding a pair with the document as a key and an empty value tolev2
.To get the results you want, iterate through
newStaff.contents.items
andadd()
each separately tolev2
. You'll also need to add the trailing comment separately, if…