Hello,

Have you tried to return with a minus operand to reverse the order ?

Regards,
Julien.

On May 9, 9:46 am, kstubs <[email protected]> wrote:
> Thanks for the tips.  Since my posting I discovered sortBy().  So I'm close,
> but don't see how/where to pass in the 2nd argument to compare.  I have:
>
> list = list.sortBy(function(s) {
>                 if(field.field.startsWith('EventScore') || field.field ==
> 'AAScore')
>                     return Number(Object.values(s)[index]);
>                 else                
>                     return Object.values(s)[index];
>             });
>
> Reason for the if/else is pretty straightforward; this fields beginning with
> EventScore or AAScore are numeric.  Anyhow, how does the 2nd argument work?
>  The above works perfectly, but strictly ascending.
>
> Karl..

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to