Comma operator

JSONiq follows the W3C standard for the concatenation of sequences with commas. The following explanations, provided as an informal summary for convenience, are non-normative.

Figure 36. Expr

Expr

Use a comma to concatenate two sequences, or even single items. This operator has the lowest precedence of all.

Example 65. Comma

1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  

Result (run with Zorba): 1 2 3 4 5 6 7 8 9 10


Example 66. Comma

{ "foo" : "bar" }, [ 1 ]
  

Result (run with Zorba): { "foo" : "bar" } [ 1 ]


Sequences do not nest. You need to use arrays in order to nest.