I have trouble in handle array PHP, I have an array:

```
[0] {
'email' => 'test@gmail.com',
'meta' => {
          'product' => {
                        'id' => '1',
                        'content' => 'This is content'
                       }
          }
}
[1] {
'email' => 'test2@gmail.com',
'meta' => {
          'product' => {
                        'id' => '2',
                        'content' => 'This is content'
                       }
          }
}
[2] {
'email' => 'test2@gmail.com',
'meta' => {
          'product' => {
                        'id' => '3',
                        'content' => 'This is content'
                       }
          }
}

```

I need to merge this array by value `'email'`, like this:

```
[0] {
    'email' => 'test@gmail.com',
    'meta' => {
              'product' => {
                            'id' => '1',
                            'content' => 'This is content'
                           }
              }
    }
[1] {
    'email' => 'test2@gmail.com',
    'meta' => {
              'product' => [0] {
                                 'id' => '2',
                                 'content' => 'This is content'
                           }
                           [1] {
                                 'id' => '3',
                                 'content' => 'This is content'
                               }
              }
    }

```

Could somebody help me?