title: Limit items in a .map loop
body: <p>I would like to ask how can I limit my <code>.map</code> loop for example to a 5 items only because currently when I access an api it returns 20 items. but I want to display only 5. Mostly that I found is just looping all throughout the array of objects and not limiting it to a number of items.</p>
  
  <p>Note: I have no control on the API because I'm just using the moviedb api</p>
  
  <p>Here's my code:</p>
  
  <pre><code>var film = this.props.data.map((item) =&gt; {
    return &lt;FilmItem key={item.id} film={item} /&gt;
  });
  
  return film;
  </code></pre>