Read
Returns matching nodes/values of a path expression for a given yaml document
yq r <yaml_file|json_file> <path_expression>Basic
b:
c: 2yq r sample.yaml b.cFrom Stdin
cat sample.yaml | yq r - b.cDefault values
Printing matching paths
Path Only
Path and Value
Collect results into an array
Printing length of the results
Length of filtered results
Anchors and Aliases
Printing anchors
Traversing anchors
Exploding Anchors
Multiple Documents
Reading from a single document
Read from all documents
Last updated