Node.js examples for Array:Convert Array
Convert array To Object
exports.arrayToObject = function (source) { var obj = {}; for (var i = 0, il = source.length; i < il; ++i) { if (typeof source[i] !== 'undefined') { obj[i] = source[i];/*from w w w .j a v a2 s .c o m*/ } } return obj; };