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