title: JS: TypeError: Cannot find function keys in object
body: <p>I have the following in apps script:  </p>
  
  <pre><code>function getQAs() {
      return [
  
        { "Do you have any pictures ?|1 ": {"yes":2,"no":3 } },
        { "Do you have any pictures ?|2 ": {"yes":2,"no":3 } },
        { "Do you have any pictures?|3 ": {"yes":2,"no":3 } },
      ]
  }
  </code></pre>
  
  <p>I'm trying to build a function that will search through the keys of The objects for a number. I'm testing with the number 1 .When I run:</p>
  
  <pre><code>function testQA() {
    var qa = getQAs();
    var matches = qa.keys().filter(function(row) { //ONLY CHECKED ROWS.
      Logger.log(row)
      return row.indexOf('1') == true;
    });
  
    Logger.log(matches);
  }
  </code></pre>
  
  <p>I get </p>
  
  <blockquote>
    <p>JS: TypeError: Cannot find function keys in object . What am I doing wrong?</p>
  </blockquote>