$avg
$avg
operator helps you in calculating average of some values in an expression. You can use this in any Expression Object
Syntax
Properties
Field | Description | Required |
---|---|---|
<expr> | The It can also be a Magical Autocomplete. | true |
Returns
float
- The result of $avg operation
Examples
Basic example
The above expression returns 3.0
With Nested Expressions
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.
With Magical Autocomplete
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
Last updated