buildMap() Operation in Map Context
Builds a map from an array.
Syntax  | 
  | |
|---|---|---|
Semantics  | Builds a map from an array. The operation returns a value of type Map. ![]()  | |
Substitutables  | 
  | Can be any variable or object attribute having the type Array and having array elements of complex type.  | 
  | Name of the key attribute of the complex type in double quotes.  | |
Examples  | Input: an array of articles 
        JSON
     
    
        CODE
     
    
Result: 
        JSON
     
    
 | |
buildMap() is a convenient method, if you need a map indexing an array.
Searching for items using a map key (name in the example above) is much faster than performing a select on the array. You should use a map if you need to search an array more than a couple of times.
Related Content
Related Pages:
Map Operations
A hash map implements an associative array. You can build a map from an array, set and get map values and entries, and remove map values.
                                    