$sqrt
Computes the square root of a numeric expression.
Syntax
{ "$sqrt": <numberExpression> }
Example
Input
{ "variance": 9 }
Stage
{ "$project": { "stdDev": { "$sqrt": "$variance" } } }
Output
{ "stdDev": 3 }
Computes the square root of a numeric expression.
{ "$sqrt": <numberExpression> }
{ "variance": 9 }
{ "$project": { "stdDev": { "$sqrt": "$variance" } } }
{ "stdDev": 3 }