📖
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 (Update)
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)
Reduce
Select
Sort Keys
Split into Documents
String Operators
Style
Subtract
Tag
Traverse (Read)
Union
Variable Operators
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 (Read)
Next
Variable Operators
Last updated 3 weeks ago
Contents
Combine scalars
Combine selected paths