mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-14 15:18:06 +00:00
355 B
355 B
Add
Add behaves differently according to the type of the LHS:
- arrays: concatenate
- number scalars: arithmetic addition
- string scalars: concatenate
- maps: shallow merge (use the multiply operator (
*
) to deeply merge)
Use +=
as a relative append assign for things like increment. Note that .a += .x
is equivalent to running .a = .a + .x
.