title: Typescript Interface Definition dynamic
body: <p>I am trying to define an interface for the following data:</p>
  <pre><code>result =
  {
     &quot;data1&quot; : [ { &quot;type1&quot; : 30 }, { &quot;type2&quot; :40 } ],
     &quot;data1&quot; : [ { &quot;abc&quot; : 40 }, { &quot;def&quot; 940 } ],
     &quot;data3&quot; : []
  }
  </code></pre>
  <p>here the keys and values inside <code>result</code> object are dynamic. Even the values inside array of objects are dynamic but it will be of format <code>string: number</code> or that array can be empty just as in <code>data3</code>.</p>
  <p>I tried using <code>[x:any]: any</code>, but looks like it will remove the significance of rest of the types defined in interface as it will match eveything.</p>
  <p>Can someone help me here?</p>