Skip to main content

$toNumber

The $toNumber operator converts a value to a number.

Input

  • A single value of any type

Output

  • The numeric representation of the input value

Examples

Convert String to Number

Result: 123

Convert Boolean to Number

Result: 1

Convert String with Decimal to Number

Result: 45.67

From Field

Result: The numeric representation of the value field