Product SiteDocumentation Site

7.2. Array Unboxing

The items in an array (which is an item) can be extracted as a sequence of items with the [] postfix operator.
The argument must be (a singleton sequence of) one array or the empty sequence (in which case the empty sequence is returned as well.
Example 7.8. Array unboxing.
[
  "What NoSQL technology should I use?",
  "What is the bottleneck in MapReduce?"
][],

for $a in collection("faqs").tags
return $a[],

()[]
Results:
"What NoSQL technology should I use?"
"What is the bottleneck in MapReduce?"
"php"
"mysql"
"nosql"
"cassandra"
"sql"
"database"
"nosql"
"non-relational-database"
"nosql"
"couchdb"
"cassandra"
"redis"
"database"
"full-text-search"
"nosql"
"couchdb"
"riak"
"database"
"view"
"nosql"
"couchdb"