$add
Last updated
$add operator lets you add multiple values and return the result of the expression. You can use this in any Expression Object.
{
"$add": [ <expr>, <expr>, ... ]
}<expr>
The <expr> expression can be any valid expression as long as it resolves to a number.
It can also be a Magical Autocomplete.
true
float - The result of $add operation
{
"$add": [1, 2, 3]
}The above expression returns 6.0
The above expression calculates the nested expression, return 3 in its place and then the outer $add expression returns 10 overall.
Let's say we have declared a variable temp in our API flow, which has a value of 5 currently.
The above expression would resolve to a result of 8.0
Last updated
{
"$add": [ { "$add": [1, 2] }, 3, 4 ]
}{
"$add": ["$.variables.temp", 3]
}