See also: toString (Convert to a string), toBigDecimal (Conversion to large decimal integer), toLong (Conversion to large integer) toInteger (Conversion to large integer)
Attempts to convert a given input value into a native number of type 'Number' (Javascript/Client).
For example, a native number is also used by the JSON format.
Tooltip
Syntax: $toNumber(any)
Parameter
Description
anyAny value (or object), which will be converted
If the input value cannot be converted, nothing (null ) is returned.
Example: $toNumber(1234.5) → Returns a native JavaScript number with value 1234.5.
Syntax
$toNumber(any)
Parameter
Name | Description |
|---|---|
any | Any value (or object), which will be converted. |
Return value
If the input value cannot be converted, nothing (null) is returned.
Examples
Syntax | Result |
|---|---|
$toNumber(1234.5) | Returns a native JavaScript number with value 1234.5. |
$toNumber($input) | Tries to convert the input value of the expression. |