Contact Us 1-800-596-4880

random

random(): Number

Returns a pseudo-random number greater than or equal to 0.0 and less than 1.0.

Example

This example generates a pseudo-random number and multiplies it by 1000.

Source

%dw 2.0
output application/json
---
{ price: random() * 1000 }

Output

{ "price": 65.02770292248383 }