%dw 2.0
output application/json
---
{ price: random() * 1000 }
DataWeave
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
Output
{ "price": 65.02770292248383 }
JSON