title: How do you set types on getting Object.keys on JSON file in TypeScript?
body: <p>I am trying to access an object from a JSON file and the error I am getting:</p>
  <pre><code>Element implicitly has an 'any' type because expression of type 'any' can't be used to index type '{...}'. ts(7053)
  </code></pre>
  <p>JSON file:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;networks&quot;: {
    &quot;5777&quot;: {
      &quot;event&quot;: {},
      &quot;links&quot;: {},
      &quot;address&quot;: &quot;string&quot;,
      &quot;transactionHash&quot;: &quot;string&quot;
    }
  }
  </code></pre>
  <p>The value <code>5777</code> will be changed from time to time. So I am trying to access the value, which gives me an error.</p>
  <p>Snippet from TS file:</p>
  <pre class="lang-js prettyprint-override"><code>import { abi, networks } from '../build/contracts/Example.json';
  import Web3 from 'web3';
  let networkId: any = Object.keys(networks)[0]; // 5777
  new web3.eth.Contract(abi, networks[networkId].address); // causing error
  </code></pre>