Breadcrumbs

buildMap() Operation

Syntax

anArray.buildMap("aKeyName")

Semantics

Builds a map from an array. The operation returns a value of type Map.

type_map.png

Substitutables

anArray

Can be any variable or object attribute having the type Array and having array elements of complex type.

aKeyName

Name of the key attribute of the complex type in double quotes.

Examples

create hashMap;
set hashMap = recordArray.buildMap("name");

recordArray is an array containing elements of type Address:

class_Address.png

buildMap() is a convenient method, if you need a map indexing an array.

Related Pages: