alphanumeric sort

Claus Guttesen kometen at gmail.com
Thu May 12 02:21:03 EDT 2011


> Iirc, "sort()" is by default lexographic in JavaScript so an added function
> is not necessary. The added function is specifically intended for a custom
> sort, ie. numerical.
>
> You could simply do something like:
>
> return v['key'].sort()
>
> Try that out and lemme know if it works as you expect.

I tried it but it didn't work. And I believe sort expects a list like
[3, 5, 8, 1] but I have an array with json-formatted objects and have
to inspect each element as described in the link I referred to in my
OP.

-- 
regards
Claus

When lenity and cruelty play for a kingdom,
the gentler gamester is the soonest winner.

Shakespeare

twitter.com/kometen



More information about the riak-users mailing list