$avg
Last updated
Last updated
$avg
operator helps you in calculating average of some values in an expression. You can use this in any
<expr>
It can also be a Magical Autocomplete.
true
float
- The result of $avg operation
The above expression returns 3.0
The above expression calculates the nested expressions, return 3 and 4 respectively in its place and then the outer $avg
expression returns 3.0 overall.
Let's say we have declared a variable temp
of type array in our API flow, which has a value of
[ 2,4,8,2 ] currently.
The above expression would resolve to a result of 4
The <expr>
expression can be any valid as long as it resolves to a number.