title: Add additional values to a Typescript JSON key that is defined as an array
body: <p>I have a class definition…</p>
  
  <pre><code>class anObj { 
    "ID" : string;
    dialog: {[id : number]:{hide: boolean;}} = {
      0 : {"hide": false},
      14 : {"hide": false}
    }    
  }
  class manyObjects {
    myGroup: anObj [] = [];
  }
  ...
  public stuff = manyObjects;
  </code></pre>
  
  <p>This totally works just the way I'd like for it to...I can use the id value as a direct key...</p>
  
  <pre><code>var x:number = 1 //used for a different tier of logic
  stuff.myGroup[x].dialog[14].hide!=true
  </code></pre>
  
  <p>Here's where I'm stuck... I'd like to add more dialogs to the group. I get all the way our to...</p>
  
  <pre><code>stuff.myGroup[x].dialog
  </code></pre>
  
  <p>and can't figure out how to add something like with a push...</p>
  
  <pre><code>.push(7 : {"hide": true})
  </code></pre>
  
  <p>for example, I can type this line and the IDE says it's ok... </p>
  
  <pre><code>stuff.myGroup[x].dialog[[id=7].push({"hide": false})];
  </code></pre>
  
  <p>however, when I check, the element does not get added to the array...</p>