Expressions constructing arrays are JSONiq-specific and introduced in this specification.
Figure 21. ArrayConstructor
Figure 22. Expr
The syntax for creating arrays is identical to that of JSON: square brackets, comma separated literals, object constructors and arrays constructors.
Example 36. Empty array constructors
[]
Result: [ ]
Example 37. Array constructors
[ 1, 2, 3, 4, 5, 6 ]
Result: [ 1, 2, 3, 4, 5, 6 ]
Example 38. Nested array constructors
[ "foo", 3.14, [ "Go", "Boldly", "When", "No", "Man", "Has", "Gone", "Before" ], { "foo" : "bar" }, true, false, null ]
Result: [ "foo", 3.14, [ "Go", "Boldly", "When", "No", "Man", "Has", "Gone", "Before" ], { "foo" : "bar" }, true, false, null ]
Square brackets are mandatory. Do not push it.