title: Filter array of arrays by row number
body: <p><a href="https://i.stack.imgur.com/uPwJK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uPwJK.png" alt="enter image description here"></a></p>
  
  <p>I'm working on reproducing a live filter box with handsontable based on the built in search functionality at <a href="http://docs.handsontable.com/0.15.0-beta6/demo-search-for-values.html" rel="nofollow noreferrer">http://docs.handsontable.com/0.15.0-beta6/demo-search-for-values.html</a>.</p>
  
  <p>Right Now I'm working with the simplest use case (<a href="http://jsfiddle.net/kc11/uL3L4teL/1" rel="nofollow noreferrer">http://jsfiddle.net/kc11/uL3L4teL/1</a>) from the docs.</p>
  
  <p>the data is an array of arrays:</p>
  
  <pre><code>var
  data = [
    ['Nissan', 2012, 'black', 'black'],
    ['Nissan', 2013, 'blue', 'blue'],
    ['Chrysler', 2014, 'yellow', 'black'],
    ['Volvo', 2015, 'yellow', 'gray']
  ],
  </code></pre>
  
  <p>As explained in the docs, In this code if you enter a search string, you get the matching cells outputted to the console using the following function:</p>
  
  <pre><code>         Handsontable.Dom.addEvent(searchFiled, 'keyup', function (event) {
                  var queryResult = hot.search.query(this.value);
  
                  console.log(queryResult);
                  hot.render();
  </code></pre>
  
  <p>I've modified this like so:</p>
  
  <pre><code>            function getRowsFromObjects(queryResult) {
                  rows = [];
                  for (var i = 0, l = queryResult.length; i &lt; l; i++) {
                      debugger
                      rows.push(queryResult[i].row);
                  }
                  console.log('rows',rows);
                  return rows;
              }
  
              Handsontable.Dom.addEvent(searchFiled, 'keyup', function (event) {
  
                  var queryResult = hot.search.query(this.value);
  
                  console.log(queryResult);
                  rows = getRowsFromObjects(queryResult);
                  hot.render();
              });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/kc11/uL3L4teL/1/" rel="nofollow noreferrer">http://jsfiddle.net/kc11/uL3L4teL/1/</a></p>
  
  <p>The reason for this is to grab the row numbers of the cells that match. </p>
  
  <p>so Now I have 'rows' - the row numbers of the filtered rows and I can get the original data using:</p>
  
  <pre><code>data = hot.getData();
  </code></pre>
  
  <p>Is there an easy way to filter the data (an array of arrays ) by the row number (i.e.) the index in javascript. </p>
  
  <p>My plan is to then grab the filtered data rows and re-render the table. </p>
  
  <p>edit: because my question may be confusing. here's example:</p>
  
  <pre><code> data = [a,b,c,d] - the letters are arrays
   rows = [0,1],
  </code></pre>
  
  <p>I'd like to apply a filter so the output is </p>
  
  <pre><code>data = [a,b]
  </code></pre>