title: get value with string key in javascript
body: <p>I can't figure out how to get an object property using a string representation of that property's name in javascript. For example, in the following script:</p>
  
  <pre><code>consts = {'key' : 'value'}
  
  var stringKey = 'key';
  
  alert(consts.???);
  </code></pre>
  
  <p>How would I use <code>stringKey</code> to get the value <code>value</code> to show in the alert?</p>