yq/pkg/yqlib/doc/Union.md
2020-11-22 13:16:54 +11:00

354 B

This operator is used to combine different results together.

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