title: Get javascript object property via key name in variable
body: <p>Say I have something that looks like this in javascripts:</p>
  
  <pre><code>var obj = {
    subObj : {}
  };
  var type = 'subObj';
  </code></pre>
  
  <p>How can I get <code>obj's</code> <code>subObj</code> w/ <code>type</code>? For instance I would like to do something like:</p>
  
  <pre><code>obj.(type);
  </code></pre>