var a = []; a[1] = '17'; a['object'] = {}; var b = []; for (var i in a){ if (!a.hasOwnProperty(i)) continue; b[i] = a[i]; }; alert(b['object']);