mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-03 19:05:38 +00:00
376 B
376 B
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.
Add is not (yet) supported for maps - however you can use merge * which will have a similar effect...