groupBy dart collections code example
Example: dartlang group array by key
import "package:collection/collection.dart";
main(List<String> 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);
}