I'm having a hard time figuring this our because of the structure of the array. How can I group this array by quiz_title in typescript and assuming that I'm using an api.
Here is the structure of the array:
"UserScore": [
{
"id": 1,
"user_id": "1",
"quiz_id": "6",
"module_id": "9",
"remarks": "0",
"users": {
"id": 1,
"name": "Carl",
"email": "carl@gmail.com"
},
"quiz_information": {
"id": 6,
"quiz_title": "Driving",
"difficulty": "Moderate",
"total_points": "15",
"created_by": "7",
"timer": "00:20:00",
"module_id": "9",
"passing_grade": null
}
},
{
"id": 2,
"user_id": "4",
"quiz_id": "6",
"module_id": "9",
"remarks": "0",
"users": {
"id": 4,
"name": "GALLARDO",
"email": "gallardo@gmail.com",
},
"quiz_information": {
"id": 6,
"quiz_title": "Defensive",
"difficulty": "Moderate",
"total_points": "15",
"created_by": "7",
"updated_by": null,
"timer": "00:20:00",
"module_id": "9",
"passing_grade": null
}
}