Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

randomInt

randomInt(Number): Number

Returns a pseudo-random integer number between 0 and the specified number (exclusive).

Transform

        
     
1
2
3
4
5
6
%dw 2.0
output application/json
---
{
  price: randomInt(1000) //Returns an integer from 0 to 1000
}