> Your compare function will need to return a -1, 0 or 1 for less than, > the same or greater than. Luckily javascript allows you > to strings lexicographically so the function is a nice two liner: > > function(a, b) { > if(a == b) return 0; > return a > b ? 1 : -1; > } > > Application: > > var reduceSort = function (v, args) { > return v.sort (function(a, b) { > if(a['key'] == b['key']) return 0; > return a['key'] > b['key'] ? 1 : -1; > }); > }; > > Eric.
Thank you so much! :-) Worked like a charm. -- regards Claus When lenity and cruelty play for a kingdom, the gentler gamester is the soonest winner. Shakespeare twitter.com/kometen _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com