"Bob Ippolito" <[EMAIL PROTECTED]> writes: > You really want to sort the items.. there's absolutely no guaranteed > ordering for properties. I'd probably also just use compare instead of > arrayEqual. > > if (compare(sorted(items(foo)), sorted(items(bar))) === 0) { > /* equal */ > }
Since you mentioned sorted, is there some way to specify how to do the sorting according to the locale? If this is off-topic, I'm sorry, but you guys are the best I know with JavaScript :-) >>> a = ['acido', 'acidez']; ["acido","acidez"] >>> sorted(a); // it will be in the correct order ["acidez","acido"] >>> b = ['ácido', 'bola']; ["ácido","bola"] >>> sorted(b); // "ácido" should be before "bola" ["bola","ácido"] This is somewhat of a problem to me since some intuitive use becomes a problem when the ordering is wrong... :-( I'd really like to avoid server side sorting because this operation will be used a lot and there might be some hundreds of entries for each user logged in the system. -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~----------~----~----~----~------~----~------~--~---