mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
502 B
502 B
Union
This operator is used to combine different results together.
{% hint style="warning" %} Note that versions prior to 4.18 require the 'eval/e' command to be specified.
yq e <exp> <file>
{% endhint %}
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