$toString
Converts a value to its string representation.
Syntax
{ "$toString": <expression> }
Example
Input
{ "orderId": 12345 }
Stage
{ "$project": { "orderId": { "$toString": "$orderId" } } }
Output
{ "orderId": "12345" }
Converts a value to its string representation.
{ "$toString": <expression> }
{ "orderId": 12345 }
{ "$project": { "orderId": { "$toString": "$orderId" } } }
{ "orderId": "12345" }