reduce
Reduces the given array to a single value using the given accumulator function
Arguments
array- The array to reduceaccumulator(accumulator, element, index)- The accumulator functioninitialValue- (optional) The initial value for the accumulator
Example
{
"$template": {
"$comment": "The field below will be 29",
"test": "{{[1, 2, 3, 5, 8, 10].reduce((a, b) => a + b)}}"
}
}