mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
582 B
582 B
This operator is used to combine different results together.
Examples
Combine scalars
Running
yq eval --null-input '1, true, "cat"'
will output
1
true
cat
Combine selected paths
Given a sample.yml file of:
a: fieldA
b: fieldB
c: fieldC
then
yq eval '.a, .c' sample.yml
will output
fieldA
fieldC
Combine selected paths
Given a sample.yml file of:
a: fieldA
b: fieldB
c: fieldC
then
yq eval '(.a, .c) |= "potatoe"' sample.yml
will output
a: potatoe
b: fieldB
c: potatoe