title: Prototype Js : How to iterate over some of the Json objects
body: <p>How to iterate over this kind of Json object in Prototype Js ( not Jquery)</p>
  
  <p>There are also sub objects with value indexs</p>
  
  <p>I want to populate multi select box with given values.</p>
  
  <pre><code>data = object(
      0 =&gt; object(
          'label' = &gt; 'test1',
          'value' = &gt; 1
      ),
      1 =&gt; object(
          'label' = &gt; 'test1',
          'value' = &gt;
          0 = &gt; object(
              'label' = &gt; 'sub testing1',
              'value' = &gt; 1
          ),
          1 = &gt; object(
              'label' = &gt; 'sub testing2',
              'value' = &gt; 1
          ),
      ),
      3 = &gt; object(
          'label' = &gt; 'test3',
          'value' = &gt;
          0 = &gt; object(
              'label' = &gt; 'sub testing - test 3',
              'value' = &gt; 33
          ),
      )
  )
  </code></pre>