find the biggest value in collection mongodb code example
Example: mongodb get maximum value from collection
db.collection.aggregate([{
$group : { _id: null, max: { $max : "$age" }}
}]);
db.collection.aggregate([{
$group : { _id: null, max: { $max : "$age" }}
}]);