Arrays

Figure 21. ArrayConstructor

ArrayConstructor

Figure 22. Expr

Expr

The syntax for creating arrays is identical to that of JSON: square brackets, comma separated literals, object constructors and arrays constructors.

Example 35. Empty array constructors

[]
      

Result: [ ]


Example 36. Array constructors

[ 1, 2, 3, 4, 5, 6 ]
      

Result: [ 1, 2, 3, 4, 5, 6 ]


Example 37. 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.