prettifyActivities function

Map prettifyActivities(
  1. dynamic data
)

Implementation

Map prettifyActivities(dynamic data) {
  var results = {};
  var activities = data['activities'];
  for (var i = 0; i < activities.length; i++) {
    Map activity = activities[i];
    activity.forEach((key, value) {
      if (activity[key]['exists_data']) {
        results[key] = activity[key];
      }
    });
  }

  return results;
}