title: Make Axios Limit the Number of Responses
body: <p>I am attempting to make an axios GET call to an API to retrieve some JSON data.  The data is stored in an array with multiple objects each containing the same keys.  There are hundreds of objects in this array but I only want to return the first ten.  I am aware I can truncate the data set once it is returned but I am wondering if there is a way to limit the amount of responses to my API call.</p>
  
  <p>Here is an example of the data set:</p>
  
  <pre class="lang-json prettyprint-override"><code>[
    {
      "userId": 1,
      "id": 1,
      "title": "The Great Gatsby",
      "author": "F. Scott Fitzgerald"
    },
    {
      "userId": 1,
      "id": 2,
      "title": "1984",
      "author": "George Orwell"
    },
    {
      "userId": 1,
      "id": 3,
      "title": "The Count of Monte Cristo",
      "author": "Alexandre Dumas"
    },
  ]
  </code></pre>
  
  <p>and my axios request is simple as well:</p>
  
  <pre class="lang-js prettyprint-override"><code>router.get('/', (req, res) =&gt; {
      axios.get(`https://jsonwebsit.info.com/posts`)
          .then( response =&gt; {
              res.send(response.data)
          })
          .catch(err =&gt; {
              console.log('Error getting all data from API', err)
          })
  });
  </code></pre>