A newer version of this documentation is available.

View Latest

Construction operators

N1QL supports array and object construction operators.

Array construction

[ elements [, elements ]* ]



Arrays are ordered lists with 0 or more values. These values can be one of the defined types. Arrays are enclosed in square brackets ([ ] ). Commas separate each value. For example: ["one", "two", "three"] and [1, 2, 3].

Object construction

{ members [ , members ]* }


string : expression

Objects contain name value members. Objects are enclosed in curly braces {}. Commas separate each pair (member). The colon (:) character separates the key or name from its value within each pair. All keys must be strings and should be distinct from each other within that object. The value can be any supported JSON data type.