yq/pkg/yqlib/doc/operators/union.md
2022-01-28 10:06:25 +11:00

354 B

Union

This operator is used to combine different results together.

Combine scalars

Running

yq --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 '.a, .c' sample.yml

will output

fieldA
fieldC