var с = {"a1":1,"b1":2}, d = [], e = []; Object.keys(с).forEach(function (key) { d.push(с[key]) e.push(key.replace(/\d/,'')) }); alert([d,e].join('\n'))