max( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Finds the maximum value across all items in the group.

The max() method refines the aggregation pipeline to find the maximum value of the specified field across all the items in the group.

Method Declaration
Copy
Method Parameters
expressionExpression

Expression to find the group's maximum value. Expression must resolve to a comparable value, such as a number or string. Learn more about using expressions in aggregation pipelines.


resultFieldNamestring

Field to store the result in.

Learn more about field keys.

Returns
Return Type:GroupStage
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?