array()

Returns an array created by evaluating all expressions specified as arguments.

Syntax

array(EXPR, ...)
Required Parameters
EXPR, ...
An expression that returns the value to be provided for each array item

Usage

json "{}" | eval array=array(1) => [1]

json "{}" | eval array=array("hello", "world") => ["hello", "world"]

json "{}"
| eval
  array=array(21 * 2, "the answer to life, the universe, and everything")
=> [42, "the answer to life, the universe, and everything"]

json "{}" | eval array=array(null) => [null]