title: Create nested hash RUBY
body: <p>i have an array of hashes, eg </p>
  
  <pre><code>array = [
  { id: 1, name: 'root' parent: null},
  { id: 2, name: 'first' parent: 1},
  { id: 5, name: 'first step' parent: 2},
  { id: 6, name: 'second step' parent: 2},
  
  { id: 3, name: 'second' parent: 1},
  { id: 7, name: 'first step' parent: 3},
  
  { id: 4, name: 'third' parent: 1},
  { id: 2, name: 'first' parent: 1},
  </code></pre>
  
  <p>]</p>
  
  <p>and i need to build something like that</p>
  
  <pre><code>hash = {
    { 
    id: 1,
    name: 'root',
    parent: null,
    childrens: [
      { id: 2,
      name: 'first',
      parent: 1,
      childrens: [
        {
          id: 5,
          name: 'first step',
          parent: 2
        },
        {
          id: 6,
          name: 'second step',
          parent: 2
        },
    ]},
    ...
  }
  </code></pre>
  
  <p>I am newbie at ruby and doesnot understand how to do this.
  Probably i need to use recursive functions? Or not?</p>