title: How to merge the array value into single array based on group
body: <p>Hi i m looking for a way to merge multiple array value into single array based on the application group. Is there someone who can help me with this problem?</p>
  
  <p>My Array:</p>
  
  <pre><code>Array{
           [0]=&gt;Application{
            [id]=&gt;1
            [name]=&gt;facebook
            [group]=&gt;mobile_app
           }
           [1]=&gt;Application{
            [id]=&gt;2
            [name]=&gt;youtube
            [group]=&gt;mobile_app
           }
           [2]=&gt;Application{
             [id]=&gt;3
             [name]=&gt;whatsapp
             [group]=&gt;messenger
           }
           [3]=&gt;Application{
             [id]=&gt;4
             [name]=&gt;skype
             [group]=&gt;messenger
           }
       }
  </code></pre>
  
  <p>Requested output:</p>
  
  <pre><code>Array{
  [0]=&gt;application{
  [id]=&gt;1
  [app_name_1]=&gt;facebook
  [app_name_2]=&gt;youtube
  [group]=&gt;mobile_app
  }
  [1]=&gt;application{
  [id]=&gt;2
  [app_name_1]=&gt;whatsapp
  [app_name_2]=&gt;skype
  [group]=&gt;messenger
  }
  }
  </code></pre>