Is that possible to sum two different objects from array object and to return single array of object?
let source= [{
"supplimentKing": [{
"pwdrName": "zzzzz",
"pwdrPrice": "2"
}],
"protinsAddonOffer": [{
"pwdrName": "oooo",
"pwdrPrice": "3"
}]
}];
result:
[{
"pwdrName": "zzzzz + oooo",
"pwdrPrice": "5"
}]
After trying to understand similar SO 1 , SO 2, SO 3 i could not understand how to get expected result.
could some one pls help me how to sum the properties in clean way?
Thanks