title: Is there conditional looping with $.each function in jQuery
body: <p>I have a query about jQuery's <code>$.each</code> method. Below is my ajax which is working quite well:</p>
  
  <pre><code>$.ajax({
      url:'js/people-json.js',
      type:'post',
      dataType:'json',
      success:function(data){
          $.each(data.names, function(i, data) {
              console.log(data);
          });
      },
      error:function(err){
          console.log(err);
      }
  });
  </code></pre>
  
  <p>This script is working fine and giving me the JSON results which I wanted to get. However this is giving me results but this is a long list of information I have stored in an external JS file with a JSON format that looks like this:</p>
  
  <pre><code>{
  "people": [
      {
          "name": "aaa",
          "age": 32,
          "email": "aaa@abc.xyz"
      },
      {
          "name": "bbb",
          "age": 21,
          "email": "bbb@abc.xyz"
      },
      {
          "name": "ccc",
          "age": 45,
          "email": "ccc@abc.xyz"
      },
      ..............lot of more here around 8000
    ]
  }
  </code></pre>
  
  <p>Is there way to loop in jQuery either this way:</p>
  
  <pre><code>$.each(data.names&lt;=200, function(i, data) {
      console.log(data);
  });
  </code></pre>
  
  <p>or this way:</p>
  
  <pre><code>$.each(data.names, function(i&lt;=200, data) {
      console.log(data);
  });
  </code></pre>
  
  <p>or this one:</p>
  
  <pre><code>$.each(data.names, function(i, data&lt;=200) {
      console.log(data);
  });
  </code></pre>
  
  <p>Can we loop with 200 results at first load and then
  with click of a button loop with another 200 and so on.</p>
  
  <p><em>Note:</em> I would prefer jQuery solution for this.</p>