Add docs for creating YAML with multiple objects

This commit is contained in:
Abhishek Veeramalla 2022-05-26 13:40:07 +05:30 committed by GitHub
parent 1e27e39927
commit 09ad3f2c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,3 +86,16 @@ will output
wrap: frog
```
## Creating yaml from scratch with multiple objects
Running
```bash
yq --null-input '(.a.b = "foo") | (.d.e = "bar")'
```
will output
```yaml
a:
b: foo
d:
e: bar
```