Sorting an Jquerry Array
Var TopPerformingPlant=[];
TopPerformingPlant.pus({Socore:1,ID:1}{Socore:2,ID:2});
var length=TopPerformingPlant.length;
TopPerformingPlant.sort(function(a, b) {
return parseFloat(b.Score) - parseFloat(a.Score);
});
TopPerformingPlant.pus({Socore:1,ID:1}{Socore:2,ID:2});
var length=TopPerformingPlant.length;
TopPerformingPlant.sort(function(a, b) {
return parseFloat(b.Score) - parseFloat(a.Score);
});
Comments