title: Check for last iteration in jQuery.each
body: <p>How can we check for the last iteration of a <code>jQuery.each()</code> loop? My loop is iterating on an object coming from a <code>$.ajax</code> request.    </p>
  
  <pre class="lang-js prettyprint-override"><code>jQuery.ajax({
    url: "&lt;?php echo $this-&gt;getUrl('xs4arabia/index/getFetchrOrderLogs/'); ?&gt;",
    type: "GET",
    data: {
      tracking_id: tracking_id
    },
    dataType: "json",
    success: function(data) {
      jQuery.each(data, function(key, value) {
        console.log(value);
      })
    }
  });
  </code></pre>