Create Map

 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.

 Example

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

map1 = map();                                                     // map constructor to initialise the map variable named map1
map1.put("creator","http://creator.zoho.com");
map1.put("writer","http://writer.zoho.com");
map1.put("sheet","http://sheet.zoho.com");

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

hdrs = { "Email" : "support@mydomain.com", "Passwd" : "mypassword", "accountType" : "HOSTED_OR_GOOGLE", "service" : "cl" };

Related links

Built-in functions related to Maps