mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Added XML decoder (#1044)
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
# Union
|
||||
|
||||
This operator is used to combine different results together.
|
||||
|
||||
## Combine scalars
|
||||
Running
|
||||
```bash
|
||||
yq eval --null-input '1, true, "cat"'
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
1
|
||||
true
|
||||
cat
|
||||
```
|
||||
|
||||
## Combine selected paths
|
||||
Given a sample.yml file of:
|
||||
```yaml
|
||||
a: fieldA
|
||||
b: fieldB
|
||||
c: fieldC
|
||||
```
|
||||
then
|
||||
```bash
|
||||
yq eval '.a, .c' sample.yml
|
||||
```
|
||||
will output
|
||||
```yaml
|
||||
fieldA
|
||||
fieldC
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user