Sorting Numbers with Comma and Percent Sign
Sorting Numbers with Comma and Percent Sign
![katz](https://secure.gravatar.com/avatar/9818b4fc47b17ad2dd6740e8a6f2b447/?default=https%3A%2F%2Fvanillicon.com%2F9818b4fc47b17ad2dd6740e8a6f2b447_200.png&rating=g&size=120)
Hi,
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,
Katz
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,
Katz
This discussion has been closed.
Replies
Let us know how you get on with it!
Allan