rand()

Returns any integer greater than or equals to 0 and less than the specified boundary value.

Syntax

rand(NUM[, SEED])
Required Parameters
NUM
Integer greater than 0.
Optional Parameters
SEED
Integer value. If you provide this value, the function always returns a fixed value, not a random integer value.
Caution
The SEED parameter is used to return a value whenever a query command is executed for purposes such as debugging query commands that use this function and testing to verify the behavior of query commands. Be aware of use in the actual operating environment.

Usage

json "{}" | eval rand=rand(1000) => Any value from 0 to 999