I have JSON data as below: I want addition of the titleaccessed, numberoflogin for same id
[ { id: '1651791',
institutionname: null,
fullname: 'Simi Abraham',
username: ' ',
totalrows: '46',
numberoflogin: '1',
logintimes: 1618963200,
titleaccessed: '2' },
{ id: '1651791',
institutionname: null,
fullname: 'Simi Abraham',
username: ' ',
totalrows: '46',
numberoflogin: '8',
logintimes: 1619049600,
titleaccessed: '18' }]
The expected output is below
[ { id: '1651791',
institutionname: null,
fullname: 'Simi Abraham',
username: ' ',
totalrows: '46',
numberoflogin: '9',// addition of numberoflogin
logintimes: 1618963200,
titleaccessed: '20' // addition of titleaccessed
}]