Sorting Numbers with Comma and Percent Sign
Sorting Numbers with Comma and Percent Sign
katz
Posts: 1Questions: 0Answers: 0
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