I have an array which looks like:
var data = [
{
student: "sam",
English: 80,
Std: 8
},
{
student: "sam",
Maths: 80,
Std: 8
},
{
student: "john",
English: 80,
Std: 8
},
{
student: "john",
Maths: 80,
Std: 8
}
];
and I need to get the total marks irrespective of subject for student sam.
By filtering data array by student name and then looping the filtered data, can get the individual student total marks.
Is there any groupBy function as similar to SQL in Typescript.