object-hashmap is a map util of the form Map<K,V> where K i.e. key and V i.e. value can be either object or primitive data type.
JS:
var objectHashMap = require('object-hashmap');
var hashMap = new objectHashMap.ObjectHashMap();
hashMap.put("key1", { test: "key1" });
hashMap.put({ key: "key2" }, { test: "key2" });
hashMap.put({ key: "key2" }, { test: "key3" });
console.log(hashMap.toString());
Node:
npm install object-hashmap
//Inserts an element in the map
put(K,V)
//Gets Value asssociated with given key or undefined if there is no such key
get(K)
//Returns String representation of the Map Object
toString()