mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 17:36:59 +08:00
Parameterised merge array by key example
This commit is contained in:
@@ -36,7 +36,7 @@ a:
|
||||
```
|
||||
then
|
||||
```bash
|
||||
valueEnv="moo" pathEnv=".a.b[0].name" yq 'eval(strenv(pathEnv)) = strenv(valueEnv)' sample.yml
|
||||
pathEnv=".a.b[0].name" valueEnv="moo" yq 'eval(strenv(pathEnv)) = strenv(valueEnv)' sample.yml
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
|
||||
Reference in New Issue
Block a user