hello @mikefarah,
thanks for your answer about my first question. But i have another question. I want to merge the following files:
file1.yml
file2.yml
file3.yml
If i run a merge with yq ea -M '. as $item ireduce({}; . *d $item)' file1.yml file2.yml file3.yml i have the following result:
a:
- b:
- c:
- foo: bar
bar: foo
c:
- john: doe
I know that the result is a valid yaml result, but for some reasons mkdocs rise an error during the mkdocs.yml parsing. So the
wanted result is the following:
a:
- b:
- c:
- foo: bar
- bar: foo
- c:
- john: doe
Is it possible to obtain a "-" on each entries of an array? Thanks for your help.
Regards
Lyandr
hello @mikefarah,
thanks for your answer about my first question. But i have another question. I want to merge the following files:
file1.yml
file2.yml
file3.yml
If i run a merge with
yq ea -M '. as $item ireduce({}; . *d $item)' file1.yml file2.yml file3.ymli have the following result:I know that the result is a valid yaml result, but for some reasons mkdocs rise an error during the mkdocs.yml parsing. So the
wanted result is the following:
Is it possible to obtain a "-" on each entries of an array? Thanks for your help.
Regards
Lyandr