Options type

Options type structure

Overview

The options type returns one or more values, depending on the number of options passed to it, as specified by the length property.

{
  "key": {
    "type": "options",
    "length": 1,
    "options": ["admin", "user", "anonymous"]
  }
}

Parameters

NameTypeDescription
typestringType of data that will be returned. Must be assigned as options.
lengthnumberSets the default length when less than 0. This is optional.
optionsarrayDefines the data to be randomly drawn to be returned as an array if the length is greater than 1, otherwise it returns the drawn value.