PageModule.prototype.makeUniqueArrayDynamic = function(inputArr){
//Find unique records depending upon group by columns
var uniqueTemp = [];
$.each(inputArr, function (i, e) {
var matchingItems = $.grep(uniqueTemp, function (item) {
//Add or change the column name here
return item.InvoiceNumber == e.InvoiceNumber;
});
if (matchingItems.length === 0){ uniqueTemp.push(e);
}
});
return uniqueTemp;
};
Comments