I've created an object that I'm trying to loop through, but the .each() function is trying to first sort the object and then loop through it, giving undesirable results. I'm using Chrome, btw, and I've heard object looping can be fairly browser-dependent.
The object:
var myObject = {"000": "12:00", "100": "1:00", "200": "2:00" .. and so on }
I loop through the object with the each function
$.each(myObject, function (key, value) {
// display value
} // outputs 1:00 2:00 12:00
I want it the output to be 12:00 1:00 2:00, the order in which I provided for the object. I don't have much leeway in changing the object keys, so I'd like to keep those if I can.
Here's the JSFiddle: http://jsfiddle.net/hyc8U/
Thanks!
PS. I'm not sure if this behavior of .each() is technically "in order" or "out of order"