Pipe the results of an expression into another. Like the bash operator.
Given a sample.yml file of:
a: b: cat
then
yq '.a | .b' sample.yml
will output
cat
a: cow b: sheep c: same
yq '.a = "cat" | .b = "dog"' sample.yml
Last updated 3 years ago
a: cat b: dog c: same