var newData = data.reduce((obj, v, i)=> { obj[v.category] = obj[v.category] || []; obj[v.category].push(v); return obj; }, {}); console.log(newData);