Showing max of 10 available products
<p>I know i can limit the loop but need to display a max of 10 if they are available...</p>

<pre><code>$.each(data.results, function(index, item) {
   console.log(item.available);
   //console.log(data.results_count);
   if(item.available == true) {
       var link = $('&lt;a&gt;&lt;/a&gt;').attr('href', item.url);
           link.append('&lt;span class="thumbnail"&gt;&lt;img src="' + item.thumbnail + '" /&gt;&lt;/span&gt;');
           link.append('&lt;span class="title"&gt;' + item.title + '&lt;/span&gt;');
           link.wrap('&lt;li&gt;&lt;/li&gt;');
       resultsList.append(link.parent());
    }
});
</code></pre>

<p>Little new to JS so unsure how to do this, at the moment i only show if item is available but just want to display a maximum of 10 if thats possible.</p>