Aggregation Functions

Min

The min function gets a minimum value for a given field.

 let minPoints = Customer[true].points.min() //find customer with minimum points

Max

The max function gets a maximum value for a given field.

 let maxPoints = Customer[true].points.max() //find customer with maximum points