Saved from https://stackoverflow.com/questions/47919716/javascript-checking-duplicate-before-insert-into-array
var found = datasetarr.find(o => o.accountID === receiptlist[i].accountID && o.subtype === ritemlist[k].type)
if (found === undefined){
//do computation
}