Back to Yq

Assign (Update)

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

4.53.2495 B
Original Source

Assign (Update)

This operator is used to update node values. It can be used in either the:

plain form: =

Which will set the LHS node values equal 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, but the RHS expression is run with each LHS node as context. This is useful for updating values based on old values, e.g. increment.

Flags

  • c clobber custom tags