$ceil
Rounds a numeric expression up to the nearest integer.
Syntax
{ "$ceil": <numberExpression> }
Example
Input
{ "measurement": 12.01 }
Stage
{ "$project": { "roundedUp": { "$ceil": "$measurement" } } }
Output
{ "roundedUp": 13 }
Rounds a numeric expression up to the nearest integer.
{ "$ceil": <numberExpression> }
{ "measurement": 12.01 }
{ "$project": { "roundedUp": { "$ceil": "$measurement" } } }
{ "roundedUp": 13 }