Maps - Put Key
The put key Deluge task inserts a key - value pair into the map variable. If the specifed key is already present in the map-variable the key's associated value is replaced with new given value.
Syntax
<map1>.put(<key>,<value>);
|
where,
<map1> refers to the name of the map variable.
<key> the key to be inserted to the target map variable.
<value> the value to be associate with given key in the target map variable.
Example
actions { on add { on load { map1 = map(); map1.put("John", "India"); map1.put("David", "USA"); } } }
|