Prism · Sugar

$avg

The mean of the numbers of a list. Shorthand for the $sum divided by the $count.

The source
{ scores: [80, 90, 100, 70] }
The config
{ $avg: { over: { $ref: '$.scores' } } }
What comes out
85
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.