ENUMERATE()

ENUMERATE()

Top  Previous  Next

 

The ENUMERATE() function identifies the elements in a data collection.

 

 

Format

 

ENUMERATE(var)

 

where

varis the data collection to be processed.

 

 

The ENUMERATE() function returns a field mark delimited sorted list of the element names in a data collection. Where an element is itself a further data collection, the function does not recurse down into the lower level item. Instead, if an application needs to create a complete map of an arbitrarily multi-dimensional data collection, it must handle the recursion internally.

 
If var references a non-existent data collection element, the ENUMERATE() function returns a null string.

 

The VARTYPE() function can be used to determine the type of a variable within a data collection.

 

 
Example

 

VAR = JPARSE(JSON.STRING)

NAMES = ENUMERATE(VAR)

 

The above code fragment parses a JSON string into a data collection and then creates a list of the top level elements within the collection.

 

 
See also:

Data collections