title: jquery for each on a map with index, key and value
body: <p>If I have data which looks something like this:</p>
  
  <pre><code>x = {"key1":"val1", "key2":"val2", "key3", "val3"};
  </code></pre>
  
  <p>Is there any standard way to do a for each over them with a function that returns the key, value and index?</p>
  
  <p>The way I would do it is define an array of keys and use the index to access it, but is there a simpler way?</p>
  
  <p>something like:</p>
  
  <pre><code>$.each(x, function(i, k, v) {
      //... do something here
  }
  </code></pre>