title: How to figure out if a value is in a range of cells using google script?
body: <p>So far I was able to get the range and using indexOf, but when I try to get the index the value is always -1 even when the value is in the range.</p>
  
  <pre><code>var ss = SpreadsheetApp.openById('url');
  var sheet = ss.getSheetByName('sheetName');
  
  var lookUp = "0000";
  var lookUpRange = sheet.getRange(2,5,3,1).getValues();
  Logger.log(lookUpRange);//this prints the array  [[0000], [123 456 7890], [98765.0]]
  //but when I do
  var index = lookUpRange.indexOf(lookUp);
  Logger.log(index);
  //the output I get is -1.0
  </code></pre>
  
  <p>Even when I change the variable lookUp I still get -1.0 as the index. Is there something I'm missing? How can I get a positive number so I can check to see if my array has a specific value?
  Any references would be appreciated.</p>