title: Using bracket notation with a variable to access object property returns undefined
body: <p>I'm relatively new to TypeScript and I'm confused about why using bracket notation on an object with variable as a key always returns <code>undefined</code>. I have an object defined that looks something like,</p>
  <pre><code>{
      &quot;data&quot;: {
          &quot;text&quot;: &quot;hello&quot;
      } 
  }
  </code></pre>
  <p>that I import into my code using something like <code>import * as myBlob from ./data.json</code>. When I access the the <code>data</code> key of <code>myBlob</code> using the bracket notation with a string literal as key (<code>myBlob['data']</code>), it works as expected. However, this access pattern returns <code>undefined</code>:</p>
  <pre><code>let key = 'data';
  myBlob[key]; //undefined
  </code></pre>
  <p>I hope someone can enlighten me on why this is happening.</p>