title: $.each raises error (e is undefined) in Firefox but works fine in Chrome
body: <p>See this JSFiddle: <a href="http://jsfiddle.net/cDVQP/1/" rel="nofollow">http://jsfiddle.net/cDVQP/1/</a></p>
  
  <p>If you have both Chrome and Firefox you can see that it works as expected in Chrome but in Firefox Firebug console you get "TypeError: e is undefined"
  On JSFiddle the error appears as "TypeError: obj is undefined"</p>
  
  <p>I've spent hours hunting down this bug and trying to figure it out and finally gave up and came here. What's causing it?</p>
  
  <p>Here is the full code to test:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
    &lt;div id="x"&gt;&lt;/div&gt;
  
    &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
  
      $(document).ready(function(){
        getVideos('cats');
      });
  
      function getVideos(query){
        var url = 'https://www.googleapis.com/youtube/v3/search?part=snippet&amp;maxResults=2&amp;q='+query+'&amp;regionCode=us&amp;type=video&amp;fields=items(id)&amp;key=AIzaSyCCOnozV0lEfnjfMTjpc4TFExAeIGJ6Fh0';
        $.ajax({
          url: url,
          success: function(data){
            appendVideos(data);
          }
        });
      }
  
      function appendVideos(data){
        // works here
        console.log(data);
  
        // but not in $.each
        $.each(data.items, function(i, item){
          $('#x').append(item.id.videoId + '&lt;br&gt;');
        });
      }
  
    &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>