Convert a list of dictionaries into a list of purposes.
static List<Purpose> toPurposes(List<dynamic> rawList) => rawList.map((e) => Purpose.fromJson(e)).toList();