Sorting Numbers with Comma and Percent Sign

Sorting Numbers with Comma and Percent Sign

katzkatz Posts: 1Questions: 0Answers: 0
edited December 2013 in TableTools

I am wondering how to tackle sorting numerical values that consist of Commas and Percent Signs.

aaSorting : [[0,'asc'],[1,'asc'],[2,'asc'],[3,'asc'],[4,'asc'],[5,'asc']] <--- this sorts numbers, but when other characters are introduced ("," and "%", it treats the value as if it's a string.

Any tips will be greatly appreciated.

Thank you,


  • allanallan Posts: 57,300Questions: 1Answers: 9,127 Site admin
    Try DataTables 1.10-dev (nightly from the downloads page: ). It will sort currency, formatted numbers and precent signs automatically.

    Let us know how you get on with it!

This discussion has been closed.