var hashMap = new Array();
    hashMap[“id1”] = “name1”;
    hashMap[“id2”] = “name2”;
用数组可以实现