yq/pkg/yqlib/doc/operators/headers/add.md
2021-12-21 15:02:07 +11:00

9 lines
271 B
Markdown

# Add
Add behaves differently according to the type of the LHS:
* arrays: concatenate
* number scalars: arithmetic addition
* string scalars: concatenate
Use `+=` as append assign for things like increment. Note that `.a += .x` is equivalent to running `.a = .a + .x`.