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