repz,
let res= {};
outs =[
{
"sec": "12",
"disp": "AD",
"num": "321"
}, {
"sec": "12",
"disp": "AD",
"num": "123"
}, {
"sec": "20",
"disp": "ND",
"num": "123"
}];
res = outs.reduce((res, {sec, num}) => (res[`${num},sec`]=(res[`${num},sec`] || 0) + +sec, res), res);
console.log(res)