📖
yq
📖
yq
📖
yq
📖
yq
v4.x
yq
Upgrading from V3
Commands
Evaluate
Evaluate All
Shell Completion
Operators
Add
Alternative (Default value)
Anchor and Alias Operators
Assign
Boolean Operators
Collect into Array
Comment Operators
Create, Collect into Object
Delete
Document Index
Env Variable Operators
Equals
File Operators
Has
Keys
Length
Multiply
Path
Pipe
Recursive Descent (Glob)
Select
Sort Keys
Split into Documents
String Operators
Style
Tag
Traverse
Union
Usage
Output format
Working with JSON
Tips, Tricks, Troubleshooting
Github Page
Powered by GitBook

Union

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
Previous
Traverse
Next - Usage
Output format
Last updated 6 days ago
Contents
Combine scalars
Combine selected paths