diff --git a/upgrading-from-v3.md b/upgrading-from-v3.md index 118b822b..364b8300 100644 --- a/upgrading-from-v3.md +++ b/upgrading-from-v3.md @@ -118,12 +118,14 @@ yq 'del(.a.b.c)' sample.yaml ### Merging documents -Like `jq`, merge is done via the multiply operator. You will need to use the eval-all command to load all documents into memory at once, and then use the file operator to select the file nodes to merge. +Like `jq`, merge is done via the multiply operator. ```bash -yq eval-all 'select(fileIndex == 0) * select(filename == "file2.yaml")' file1.yaml file2.yaml +yq '. * load("file2.yaml")' file1.yaml ``` +See the [multiply documentation](https://mikefarah.gitbook.io/yq/operators/multiply-merge) for more example and options. + ### Prefix yaml Use the [Create / Collect Into Object ](broken-reference)operator to create a new object with the desired prefix.