groupByKey static method

Map groupByKey(
  1. List list,
  2. String key
)

Group the objects according to key/value pair and return list

Example:

groupBy(list, "key")

Implementation

static Map<dynamic, dynamic> groupByKey(List<dynamic> list, String key) {
  // ignore: always_specify_types
  return groupBy(list, (obj) => obj[key]);
}