Node.js examples for Object:Object Operation
Create Map object from single list
/**/*from w w w . j a v a 2 s . c o m*/ * Create Map object from single list * * @param {Array} list * @return {Object} */ function arrayToMap(list) { var map = {} for (var i = 0; i < list.length; i++) { map[list[i]] = list[i] } return map }