obj = data.reduce(function(a, b) { if (!a[b.name]) a[b.name] = []; a[b.name].push([+new Date(b.create_at), +b.counter]);return a},{});