title: How to limit an each loop on json data in jquery ?
body: <p>Is there a nice way to loop on only the first 3 items of a json object using the jquery each loop?</p>
  
  <p>I am thinking of an equivalent of the <a href="http://api.jquery.com/slice/">.slice(start,end)</a> function.</p>
  
  <pre><code>var data = [ 
   {"Id": 10004, "PageName": "club"}, 
   {"Id": 10040, "PageName": "qaz"}, 
   {"Id": 10059, "PageName": "ee"}, 
   {"Id": 10089, "PageName": "dd"}, 
   {"Id": 10095, "PageName": "hh"}
  ];
  
  $.each(data, function(i, item) {
      alert(item.PageName);
      // somehow break at item 3
  });​
  </code></pre>