Multiple Document Support!
Pre-release
Pre-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