Contact Free trial Login

isDecimal

isDecimal(Number): Boolean

Returns true if the given number contains a decimal, false if not.

Parameters

Name Description

number

A number to evaluate.

Example

This example indicates whether the input number has a decimal.

Source

%dw 2.0
output application/json
---
{
  "decimal" : isDecimal(1.1),
  "decimal" : isDecimal(1)
}

Output

  {
    "decimal": true,
    "decimal": false
  }

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub