I have a column in DataTables which holds some amounts and they are formatted like 1,200.00 and I want to get the max amount on the column. In order to do that I use the below code which I got a problem with at the moment if I have 22.50, 250.00, and 1,200.00 in the column it suppose to give me 1,200.00 as the max amount but it will bring back 250.00 as the biggest.
var maxPrice = table
.column(2)
.data()
.sort(function(a,b){
return a - b
})
.reverse()[0];