The way to create a map (actually the practical way is the json implementation)
var a = {};
a["key1"] = "value1";
a["key2"] = "value2";
Since it is a map, there is retrieval To check whether a key exists, write
if ( "key1" in a) {
// something
} else {
// something else
}
A simple sentence to declare the key and value in the map Way:
var a = {'key1': ' value1', 'key2': 'value2'}