Skip to content

$sqrt

Computes the square root of a numeric expression.

Syntax

{ "$sqrt": <numberExpression> }

Example

Input

{ "variance": 9 }

Stage

{ "$project": { "stdDev": { "$sqrt": "$variance" } } }

Output

{ "stdDev": 3 }