groupBy forEach and sortBy all in one