add item to map code example
Example 1: append to map javascript
var myMap = {};
myMap[newKey] = newValue;
// ...
// Another method
var myMap = new Map()
myMap.set("key0","value")
// ...
myMap.has("key1"); // evaluates to false, assuming key1 wasn't set
Example 2: java add element to map
map.put(key, Object);
//exemple:
Map<String, String> map = new HashMap<String, String>();
map.put("mykey", "myvalue");