This operator is used to update node values. It can be used in either the:
### plain form: `=`
Which will assign the LHS node values to the RHS node values. The RHS expression is run against the matching nodes in the pipeline.
### relative form: `|=`
This will do a similar thing to the plain form, however, the RHS expression is run against _the LHS nodes_. This is useful for updating values based on old values, e.g. increment.
## Create yaml file
Running
```bash
yq eval --null-input '.a.b = "cat" | .x = "frog"'
```
will output
```yaml
a:
b: cat
x: frog
```
## Update node to be the child value
Given a sample.yml file of:
```yaml
a:
b:
g: foof
```
then
```bash
yq eval '.a |= .b' sample.yml
```
will output
```yaml
a:
g: foof
```
## Double elements in an array
Given a sample.yml file of:
```yaml
- 1
- 2
- 3
```
then
```bash
yq eval '.[] |= . * 2' sample.yml
```
will output
```yaml
- 2
- 4
- 6
```
## Update node from another file
Note this will also work when the second file is a scalar (string/number)