title: Checking for existing array in array before pushing
body: <p>I missing something when trying to push to an array while preventing duplicates.</p>
  
  <p>I keep figuring out code that will push every occurence of an employee to the new employees array but I cannot figure out how to only push an unique list.</p>
  
  <p>My final array is a 2d array so that can be setValues() back into a column in the Google sheet.</p>
  
  <pre><code>function queryEmployees(){
    var sh = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
    var lRow = sh.getLastRow();
    var data = sh.getRange(1,1,lRow,2).getValues();
    var employees = [];
    for(i=0;i&lt;data.length;i++){
       if(data[i][0]==='Team member evaluated'){
         if(employees.indexOf([data[i][1]])===-1){
           employees.push([data[i][1]]);
         }
       }
    }
    Logger.log(employees);
    Logger.log(employees.length);
    SpreadsheetApp.getActiveSpreadsheet().getSheets()[1]
    .getRange(1,1,employees.length,1).setValues(employees);
      }
  </code></pre>