$sqrt
Last updated
$sqrt operator helps you in calculating square root value in an expression. You can use this in any Expression Object.
{
"$sqrt":<value | expr>
}<value | expr>
The <value> is any valid number.
The <expr> expression can be any valid expression as long as it resolves to a number.
It can also be a Magical Autocomplete.
true
float - The result of $ceil operation
{
"$sqrt": 4
}The above expression returns 2
The above expression calculates the nested expression, return 16 in its place and then the outer $sqrt expression returns 4 overall.
Let's say we have declared a variable temp in our API flow, which has a value of 64 currently.
The above expression would resolve to a result of 8
Last updated
{
"$sqrt": { "$multiply": [4, 4] }
}{
"$sqrt":"$.variables.temp"
}