title: window["object.something"] not working for objects javascript
body: <p>Hi I just can't figure this one out. </p>
  
  <p>I need to use the <code>window["evaluate string into js object"]</code> because I am converting a web Application into a ChromeOS Chrome app and they do not let you use <code>eval()</code> to do their content security policy.</p>
  
  <p>My problem is that for basic varibles it is fine, example:</p>
  
  <pre><code>var a = "foo";
  
  var b = window["a"];
  </code></pre>
  
  <p>This will put "foo" into b no problem. But as soon as I have an object (both global or local) it doesn't work, so if 'a' was an object the code would like something like this:</p>
  
  <pre><code>a.test = "foo";
  
  var b = window["a.test"];
  </code></pre>
  
  <p>That will not work.</p>
  
  <p>Is there a reason for this? I can't seem to find much info on <code>window[]</code> in general so wondering if anyway has any insight or at least can point me in the right direction to look. </p>
  
  <p>Thanks</p>