title: Getting a specific number of JSON items with jQuery from tumblr feed
body: <p>I'm trying to populate a page with X entries from my tumblr feed, and I'm wondering how I can only pull that X number from the JSON object it returns.</p>
  
  <p>Here's my code, pulled from another Stack Overflow post and modified:</p>
  
  <pre><code>//Tumblr retrieval
  $.getJSON("http://tumblr-address/api/read/json?callback=?", 
    function(data) {
      $.each(data.posts, function(i,posts){
        var title = this["regular-title"]; 
        var type = this.type; 
        var date = this.date; 
        var url = this["url-with-slug"];
  
        $('#sideRail ol').prepend('&lt;li&gt;&lt;p&gt;&lt;a href=' +url +'&gt;' + title + '&lt;/a&gt;&lt;/p&gt;&lt;p&gt;' + date + '&lt;/p&gt;&lt;/li&gt;'); 
      });
   });
  </code></pre>
  
  <p>I've tried using a while loop with a counter, but it just repeats everything X times before moving on to the next item in the list.</p>
  
  <p>Thanks for any help.</p>