Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

How to sort numbers ignoring sign

$
0
0

Hi. I have a column with numbers like this: [1, 2, 3, 11, -15, -4] and so on. It could be a positive or negative values. I would like to sort it with ignoring sign. As example I would like to get something like this after sorting my example:
[-15, 11, -4, 3, 2, 1] or [1, 2, 3, -4, 11, -15]? How to do that?


Viewing all articles
Browse latest Browse all 2364

Trending Articles