Código
const obj = [{id: 'a', time: 1}, {id: 'a', time: 2}, {id: 'b', time: 1}]; const objMapped = obj.reduce((acc, item) => { let { id, time } = item; acc[id] = acc[id] || []; acc[id].push(time); return acc; }, {}); console.log(objMapped);
saludos...