title: Javascript : Objects and multidimensional array
body: <p>I have created one namespace object.</p>
  
  <pre><code>gf.jsObjects = {}
  </code></pre>
  
  <p>I want to hold the following data in the objects.</p>
  
  <pre><code>gf.jsObjects { obj1: [id: 1, name: "2"], ... ] obj2: [id: "1", name: "name"]}; or
  gf.jsObjects { obj1: [1,'name'], ... ] obj2: [1,2],[1,'name'], ...};
  </code></pre>
  
  <p>I tried the following.</p>
  
  <pre><code>gf.jsObjects.obj1 = [];
  gf.jsObjects.obj1 = [][]; //This one gives "Uncaught SyntaxError: Unexpected token ] "
  var i = 0;
  $.each(...) {
      gf.jsObjects.obj1[i].push(value1);
      gf.jsObjects.obj1[i].push(value2);
      i++;
  });
  </code></pre>
  
  <p>It is not working. "Uncaught TypeError: Cannot call method 'push' of undefined"</p>