title: Iterate over an object in Google Apps script
body: <p>I thought my question would be answered with <a href="https://stackoverflow.com/questions/18347921/simple-google-spreadsheet-for-each-loop">this</a> or <a href="https://stackoverflow.com/questions/15616530/google-spreadsheet-script-how-to-loop-range-of-cells-and-set-value-in-adjacent">this</a> but neither is what I'm looking for.</p>
  
  <p>I have an object in Google Script, and want to iterate over each element:</p>
  
  <pre><code>var dict = {
      "foo": "a",
      "bar": "b"
  };
  
  for each key, element in dict{
      print the key and the element
  }
  </code></pre>
  
  <p>Is this possible?</p>