mirror of
https://github.com/mikefarah/yq.git
synced 2026-08-24 08:22:13 +08:00
Fix precedence of merge anchor sequence for traverse (explode was already correct)
This commit is contained in:
@@ -399,7 +399,7 @@ foobar_thing
|
||||
```
|
||||
|
||||
## Traversing merge anchor lists
|
||||
Note that the later merge anchors override previous
|
||||
Note that the keys earlier in the merge anchors sequence override later ones
|
||||
|
||||
Given a sample.yml file of:
|
||||
```yaml
|
||||
@@ -428,7 +428,7 @@ yq '.foobarList.thing' sample.yml
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
bar_thing
|
||||
foo_thing
|
||||
```
|
||||
|
||||
## Splatting merge anchor lists
|
||||
@@ -460,9 +460,9 @@ yq '.foobarList[]' sample.yml
|
||||
will output
|
||||
```yaml
|
||||
bar_b
|
||||
foo_a
|
||||
bar_thing
|
||||
foo_thing
|
||||
foobarList_c
|
||||
foo_a
|
||||
```
|
||||
|
||||
## Select multiple indices
|
||||
|
||||
Reference in New Issue
Block a user