Hardly shorter than just writing the for loop, i.e. the example in python
groupByAge = collections.defaultdict(list)
for person in people:
groupByAge[person["age"]].append(person)