%dw 2.0
output application/json
---
[isInteger(1), isInteger(2.0), isInteger(2.2), isInteger("1")]
DataWeave
isInteger
isInteger(Number): Boolean
Returns true
if the given number is an integer (which lacks decimals),
false
if not.
Parameters
Name | Description |
---|---|
|
The number to evaluate. |
Example
This example indicates whether the input is an integer for different values. Note numbers within strings get coerced to numbers.
Source
Output
[ true, true, false, true ]
JSON