OBJECT collection operator

Hello!
This construction:
OBJECT TOSTRING(v.`id`): { “id”: v.`id` “name”: v.`name` } FOR v IN c END
is valid and give an expected result, but in the documentation there is no info about OBJECT operator (at least I can’t find it).
So, my question is: why?

This is valid syntax. Documentation might missed it.

RRAY, FIRST, and OBJECT

Range transforms (ARRAY, FIRST, OBJECT) allow you to map and filter the elements or attributes of a collection or object(s). ARRAY evaluates to an array of the operand expression, while FIRST evaluates to a single element based on the operand expression. OBJECT evaluates to an object whose name : value attributes are name-expr : expr .

Name-expr must evaluate to a string. If not, that attribute is omitted from the result object.

range-xform:

1 Like