Navigation
This version of the documentation is archived and no longer supported.
$first (aggregation)
-
$first
Returns the first value it encounters for its group.
Note
Only use $first when the $group follows
a $sort operation. Otherwise, the result of this
operation is unpredictable.