I have two object of arrays, i want to process it as following output
var parts={"Glenn": [12,22,32],
"Ryan": [13,23,33],
"Steve K": [14],
"Jerom":[15,25,35],
};
var labor={
"Glenn": [12,22,32],
"Ryan": [13,23,33],
"Steve K": [14],
"Nike":[16,26,36]
};
//Target output
[{person:"Glenn",count:6},
{person:"Ryan",count:6},
{person:"Steve K",count:2},
{person:"Jerom",count:3},
{person:"Nike",count:3}
];
Here count means the length of array regards to key and person is the key,If keys are matched then add their array length and assign it to count and key appear as person, if no match then just copy it to new array.Please help me how to achieve above array objects