title: Multidemisional array
body: <p>i am trying to create a multidimensional array from a flat array. but i somehow i can not figure it out.</p>
  <p>I manage it to get it 1lvl deep but can not figure out how to go all the way:
  example :</p>
  <pre><code>[
    { id: 'cG9zdDoyODI=', parentId: null, children: [] },
    { id: 'cG9zdDoyODM=', parentId: null, children: [] },
    { id: 'cG9zdDoyODc=', parentId: null, children: [] },
    { id: 'cG9zdDoyODY=', parentId: 'cG9zdDoyODc=', children: [] },
    { id: 'cG9zdDozMDE=', parentId: 'cG9zdDoyODY=', children: [] },
    { id: 'cG9zdDozMDI=', parentId: 'cG9zdDozMDE=', children: [] },
    { id: 'cG9zdDoyODQ=', parentId: 'cG9zdDoyODc=', children: [] },
    { id: 'cG9zdDoyODU=', parentId: 'cG9zdDoyODc=', children: [] } 
  ]
  </code></pre>
  <p>i am trying to place each object that has a parent into the parents children array.</p>
  <p>all the help is welcome, thanks in advance</p>