Hey Björn, I've got some experience with this issue; I happen to have a framework with features that rely on object-key order. In brief: *All* browsers preserve object key order (that is, first-in, first-out object creation). Modern browsers don't preserve keys that are (coerce-able to) integers.
I've written a small statement regarding my framework's reliance on FIFO object keys. Consider this, along with the advice you've been given... then do what works for you. https://github.com/bemson/Flow/wiki/About-Key-Order-Preservation Regarding your original problem, know that Arrays exist to make it easy to work with collections. It sounds like your object-to-be-sorted should start as an Array, since you plan to enumerate through them often. [I compile my object once, in my framework, and work with the resulting Arrays.] If you plan to add/remove data in your object, and sort it often enough, consider a solution that uses and Array and a custom-sorting function. Smart use of Array methods may be all you need here. - best, bemson -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
