title: How to list the properties of a JavaScript object?
body: <p>Say I create an object thus:</p>
  
  <pre><code>var myObject =
          {"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"};
  </code></pre>
  
  <p>What is the best way to retrieve a list of the property names? i.e. I would like to end up with some variable 'keys' such that:</p>
  
  <pre><code>keys == ["ircEvent", "method", "regex"]
  </code></pre>