Better formatting of merge arrays example

This commit is contained in:
Mike Farah 2021-11-29 21:06:00 +11:00
parent de3110cf16
commit 6c347598ad

View File

@ -262,8 +262,9 @@ And another sample another.yml file of:
```
then
```bash
yq eval-all '((.[] | {.a: .}) as $item ireduce ({}; . * $item )) as $uniqueMap
| ( $uniqueMap | to_entries | .[]) as $item ireduce([]; . + $item.value)
yq eval-all '
((.[] | {.a: .}) as $item ireduce ({}; . * $item )) as $uniqueMap
| ( $uniqueMap | to_entries | .[]) as $item ireduce([]; . + $item.value)
' sample.yml another.yml
```
will output