Skip to content

#isInteger

Returns true if the value is a whole number.

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

boolean

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

Try it in the playground →

#isDecimal · #toInteger