$toDouble
Converts a value to a double-precision floating point number.
Syntax
{ "$toDouble": <expression> }
Example
Input
{ "price": "19.75" }
Stage
{ "$project": { "price": { "$toDouble": "$price" } } }
Output
{ "price": 19.75 }
Converts a value to a double-precision floating point number.
{ "$toDouble": <expression> }
{ "price": "19.75" }
{ "$project": { "price": { "$toDouble": "$price" } } }
{ "price": 19.75 }