mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-14 15:18:06 +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...