Create Map

Table of ContentsDown

 Create Map

The create map Deluge task creates a new empty map expression. If the target map variable is already defined as a map variable, then all its content will be erased. The map expression related tasks (put, putAll, remove, clear) and opertions can be done only if the map variable is defined.


In the following sample code, a map named map1 is defined.

map1 = map();                                                     // map constructor to initialise the map variable named map1

Following is an example to declare a map variable hdrs with key-value pairs.

hdrs = { "Email" : "", "Passwd" : "mypassword", "accountType" : "HOSTED_OR_GOOGLE", "service" : "cl" };

Related links

Built-in functions related to Maps