Nav

floor

floor(Number): Number

Rounds a number downwards, returning the first full number below the one provided.

Transform

        
     
1
2
3
4
5
6
7
8
%dw 2.0
output application/json
---
{
  a: floor(1.5),
  b: floor(2.2),
  c: floor(3)
}
Output

        
     
1
2
3
4
5
{
  "a": 1,
  "b": 2,
  "c": 3
}