I have a dynamic array and I need to perform a sum of it.
{ClientName: "A", Alex: 2, Da: 0, Cal: 0}
{ClientName: "b", Alex: 0, Da: 0, Cal: 4}
{ClientName: "c", Alex: 1, Da: 0, Cal: 5}
{ClientName: "d", Alex: 2, Da: 0, Cal: 0}
in this array, client name is fixed but other columns like Alex, Da, Cal are dynamic and will vary. i need to create a generic function in typescript where output will be like this.
{ClientName: "Total", Alex: 5, Da: 0, Cal: 9}