title: Creating json in loop
body: <p>I'm just starting with javascript. I can't create JSON message dynamically. 
  I have this structure:</p>
  
  <pre><code>one: {
      two: {
          $: {
                  three: "ttt"
          },
          four: {
              five: "xxx",
              six: "yyy",
              seven: "zzz"
          }
      }
  }
  </code></pre>
  
  <p>I'd like to have a function generating this json. <code>one</code>, <code>two</code>, <code>$</code>, <code>three</code> are constants. My function should get array of <code>four</code> structure and create json with many <code>four</code> structure. How to do that?</p>