I have following master.yaml file
root:
- name: First
some_value: One
- name: Second
some_value: Two
and update.yaml file
defaults:
other_value: true
one_more: Three
The expected result is:
root:
- name: First
some_value: One
other_value: true
one_more: Three
- name: Second
some_value: Two
other_value: true
one_more: Three
I tried following command:
yq eval-all '(select(fileIndex == 0).root.[] *+ select(fileIndex == 1).defaults)' './master.yaml' './update.yaml'
but the result is:
name: First
some_value: One
other_value: true
one_more: Three
name: Second
some_value: Two
other_value: true
one_more: Three