Skip to content

Multiple Document Support!

Pre-release
Pre-release
Compare
Choose a tag to compare
@mikefarah mikefarah released this 15 Jun 10:50
· 1681 commits to master since this release

Finally added multiple document support!

Use the '-d' argument to specify a particular document, default to 0 (first doc) if not specified.

yq r -d1 content.yaml this.deep[0].path
yq w -d1 content.yaml this.deep[0].path newValue

Backward breaking change
A result of this is that now only the read command supports the JSON output flag, all other commands do not (as you cannot have multiple documents in a JSON file. If you still want JSON output you'll need to pipe:

yq w -d1 content.yaml this.deep[0].path newValue | yq r -d1 -

Currently in beta and available just in Git - will promote to brew, snap etc shortly

Fixed #9