Contact Free trial Login

abs

abs(Number): Number

Returns the absolute value of a number.

Parameters

Name Description

number

The number to evaluate.

Parameters

Name Description

number

The number to apply the operation to.

Example

This example returns the absolute value of the specified numbers.

Source

%dw 2.0
output application/json
---
[ abs(-2), abs(2.5), abs(-3.4), abs(3) ]

Output

[ 2, 2.5, 3.4, 3 ]

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.