List expressions

size($list)

Number of elements in the list.

reverse($list)

Reverse the order of the elements in the list.

head($list), last($list), tail($list)

head() returns the first, last() the last element of the list. tail() returns all but the first element. All return null for an empty list.

[x IN list | x.prop]

A list of the value of the expression for each element in the original list.

[x IN list WHERE x.prop <> $value]

A filtered list of the elements where the predicate is true.

[x IN list WHERE x.prop <> $value | x.prop]

A list comprehension that filters a list and extracts the value of the expression for each element in that list.

reduce(s = "", x IN list | s + x.prop)

Evaluate expression for each element in the list, accumulate the results.

Comments