From b52d86e468ea6b067f874549678e5241a2b732b6 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Fri, 27 May 2022 11:22:29 +1000 Subject: [PATCH] Added multiple object example from PR #1226 --- operators/create-collect-into-object.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/operators/create-collect-into-object.md b/operators/create-collect-into-object.md index b90866c9..12802ba5 100644 --- a/operators/create-collect-into-object.md +++ b/operators/create-collect-into-object.md @@ -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 +``` +