title: Is it necessary to create nested jSON objects before using it?
body: <p>I think I've seen how to create a JSON object without first preparing it. This is how i prepare it:</p>
  
  <pre><code>obj = {
    0:{
      type:{}
    },
    1:{},
    2:{}
  };
  </code></pre>
  
  <p>Now I think I can insert a value like: <code>obj.0.type = "type0";</code> But I'd like to create it while using it: <code>obj['0']['type'] = "Type0";</code>.</p>
  
  <p>Is it possible, or do I need to prepare it? I'd like to create it "on the fly"!</p>
  
  <p><strong>EDIT</strong><br></p>
  
  <p>I'd like to create JS object "On the fly".<br></p>
  
  <pre><code>var obj = {};
  obj.test = "test"; //One "layer" works fine.
  obj.test.test = "test" //Two "layers" do not work... why?
  </code></pre>