Skip to content

#isBoolean

Returns true if the value is a boolean.

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

boolean

source.json
{
"a": true,
"b": "true"
}
transformer.json
{
"a": "#isBoolean($.a)",
"b": "#isBoolean($.b)"
}
output.json
{
"a": true,
"b": false
}

Try it in the playground →

#toBoolean