Skip to content

#toBoolean

Returns a value converted to a boolean.

#toBoolean(value)
Category Types and conversionValid in Property value
Name Type Description
value path | value The value to convert.

boolean

source.json
{
"flag": "true"
}
transformer.json
{
"result": "#toBoolean($.flag)"
}
output.json
{
"result": true
}

Try it in the playground →

#isBoolean