title: Google apps script search in two columns get matching rows as 2D array
body: <p>the following gs code is working well</p>
  
  <pre><code>function getData00(e) {
    var id = "SHEET_ID";
    var sheetname = "SHEET";
    var data = SpreadsheetApp.openById(id).getSheetByName(sheetname).getDataRange().getValues();
    var ar = [];
    data.forEach(function(f) {
      if (~f.indexOf(e.color)) {
        ar.push(f);
      }
    });
    return ar;
  }
  </code></pre>
  
  <p>So i can search in column for specific "color" value and get the corresponding row values.
  Now i need to add another criteria to search also in another column and get the combined row values.</p>
  
  <p>my spreadsheet:</p>
  
  <pre><code>Number |   color   |   level   |   price   |   size   |   type
  1      |   red     |   first   |    25     |    4     |   local
  2      |   blue    |   third   |    30     |    3     |   global
  3      |   green   |   second  |    40     |    6     |   local
  4      |   blue    |   second  |    60     |    5     |   global
  
  </code></pre>
  
  <p>i need to search for "blue" in column B and for "local" in column F to get the matching rows values.</p>
  
  <p>Result i am looking for:</p>
  
  <pre><code>2,blue,third,30,3,global
  4,blue,second,60,5,global
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;p id="demo"&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  &lt;script&gt;
  function dispData(ar) {
   document.getElementById("demo").innerHTML = ar;
  }
  function getData00(e) {
    google.script.run.withSuccessHandler(dispData).getData00(e);    
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks in advance and appreciate any help</p>