My goal is to categorize tasks based on their descriptions in order to calculate the average progress of each task later.
let ar = [
[
{ task: 'Hello world', c: 56 },
{ task: 'Hello world1', c: 34 },
{ task: 'Hello world2', c: 80 },
{ task: 'Hello world3', c: 80 },
],
[
{ task: 'Hello world', c: 12 },
{ task: 'Hello world1', c: 60 },
{ task: 'Hello world2', c: 90 },
],
];
let t = [
{ task: 'Hello world', c: [56, 12] },
{ task: 'Hello world1', c: [34, 60] },
{ task: 'Hello world2', c: [80, 90] },
{ task: 'Hello world3', c: [80] },
];
ar represents the original data and t is the desired outcome I am aiming for.
Appreciate your help