📜  dartlang 按键分组数组 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:07.735000             🧑  作者: Mango

代码示例1
import "package:collection/collection.dart";

main(List args) {
  var data = [
    {"title": 'Avengers', "release_date": '10/01/2019'},
    {"title": 'Creed', "release_date": '10/01/2019'},
    {"title": 'Jumanji', "release_date": '30/10/2019'},
  ];


  var newMap = groupBy(data, (obj) => obj['release_date']);

  print(newMap);
}