title: jQuery - Iterate over Objects with numeric keys
body: <p>I have an Object:</p>
  
  <pre><code>var myObj = { 5: "foo", 25: "bar" };
  </code></pre>
  
  <p>Now i want to walk through the object like this:</p>
  
  <pre><code>$.each(myObj, function(key, value) {
      console.log(value); 
  });
  </code></pre>
  
  <p>The problem is, that jQuery walks 26 times through the array while value will be "undefined" in 24 cases (i debugged it - thats fact). So it walks through the object 5 times before it reaches the fifth value (which is the first one).</p>
  
  <p>I dont want to convert the object to an array since i want to store the data back into the stack after handling the data.</p>
  
  <p>Is this a jQuery-Bug, a bug of mine or how to solve this?</p>
  
  <h2>Additional Info:</h2>
  
  <p>Here's a screenshot of my Chrome's DevTools shows the object at runtime.</p>
  
  <p>sT.data.tasks contains the same content as splitTicket - just needed to show splitTicket because sT.data.tasks is lost inside the $.each-Scope. (Maybe that indicates the problem?) - Another thing to note is the "length" of the object with key "2517" - Is that a Google-Chrome Bug, a javascript Bug or just correct?</p>
  
  <p>-> Note that at the current breakpoint <strong>tkey is 0 (int) and tval is undefined</strong> (undefined) and since this code wont produce any Errors, it walks through it 2517 times (did not count^^)</p>
  
  <p><img src="https://i.stack.imgur.com/WXQPa.jpg" alt="DevTools Output"></p>