title: javascript access multidimensional object not working
body: <p>I have an object:</p>
  
  <pre><code>var Obj = [{
      id: "",
      position: {
          cartesian: [],
          polar: [],
          bob: "INERTIAL"
      }
  }];
  </code></pre>
  
  <p>When I go to set obt.id </p>
  
  <pre><code>Obj.id="sam/reconnaissance - "+samName;
  </code></pre>
  
  <p>It works fine. </p>
  
  <p>However when I go to access  Obj.position.cartesian</p>
  
  <pre><code>(Obj.position.cartesian).push(fooBar[i][t][p]);
  </code></pre>
  
  <p>I get this error: </p>
  
  <pre><code>     (Obj.position.cartesian).push(fooBar[i][t][p]);
                              ^
  TypeError: Cannot read property 'cartesian' of undefined
  </code></pre>
  
  <p>Why? I have tried <code>Obj['position']['cartesian']</code> and still nothing </p>
  
  <p>What am I doing wrong? </p>