Open mcoblefias opened 3 years ago
Doing a single key looks straight-forward.
var list = new List(myObjectArray) var result = list .groupBy(p => p.page) .select(g => ({ page: g.key, count: g.value.count(), })) .toArray()
But how do I do multiple keys?
var list = new List(myObjectArray) var result = list .groupBy(p => ({ page: p.page, date: moment(p.dateTime).format('YYYY-MM-DD')})) .select(g => ({ page: g.key.page, <-- ??? date: g.key.date, <-- ??? count: g.value.count(), })) .toArray()
Doing a single key looks straight-forward.
But how do I do multiple keys?