title: javascript dot notation to bracket notation in array of objects
body: <p>I have an array of objects and I'm looking to use google closure. I need to convert some dot notation to bracket notation.</p>
  
  <p>At the moment, I'm accessing properties in a loop like this:</p>
  
  <pre><code>TheArray[i].MyProp1;
  TheArray[i].MyProp2;
  </code></pre>
  
  <p>When I write</p>
  
  <pre><code>TheArray[i].['MyProp1'];
  </code></pre>
  
  <p>it doesn't convert. How do I do this conversion to bracket notation in arrays of objects.</p>