Skip to main content

$toBoolean

The $toBoolean operator converts a value to a boolean.

Input

  • A single value of any type

Output

  • The boolean representation of the input value

Examples

Convert Number to Boolean

Result: true

Convert Zero to Boolean

Result: false

Convert String to Boolean

Result: true

From Field

Result: The boolean representation of the value field