Skip to main content

ENUMERATE

Deprecated version

This document refers to a deprecated version of the RQL programming language.

Please go here for documentation related to the latest supported version.

Create a new collection with a tuple consisting of the index (starting from 0) and the element.

Syntax
ENUMERATE(<collection>)
Example
enumerate(["a","b"]) // [(0,"a"),(1,"b")]
enumerate([(name: "John", age: 30),
(name: "Jane", age: 31)])
// [(0, (name: "John", age: 30)), (1, (name: "Jane", age: 31))]