title: How to remove n last items in a filtered crossfilter data
body: <p>I'm using <a href="https://www.npmjs.com/package/crossfilter2" rel="nofollow noreferrer">crossfilter</a> just to filter a JSON array.
  What I need to do is:</p>
  
  <ul>
  <li>After filtering, remove <code>n</code> last items in the array so that the array has the <code>length</code> of <code>50</code> if the filtered array is larger than <code>50</code> in <code>length</code></li>
  </ul>
  
  <p>The current code is:</p>
  
  <pre><code>    const re = new RegExp('example', 'gimu');
  
      const commentData = crossfilter(exampleComments);
      return commentData
        .dimension(c =&gt; c.comment)
        .filter(comment =&gt; re.test(comment))
        .allFiltered();
  </code></pre>
  
  <p>What do I need to do after <code>.allFiltered()</code> to slice the array so that the length of the returned data is <code>50</code>?</p>
  
  <p>I could easily achieve this with vanilla Javascript but I would prefer to use <a href="https://www.npmjs.com/package/crossfilter2" rel="nofollow noreferrer">crossfilter</a>.</p>