yq/pkg/yqlib/doc/operators/headers/assign-update.md

9 lines
451 B
Markdown
Raw Normal View History

2021-11-03 04:00:58 +00:00
# Assign (Update)
2020-11-19 06:08:13 +00:00
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.