title: Group array of objects nesting a key in Typescript
body: <p>I have an array of objects where these objects can have the same name, and each object has a error key that is an array.</p>
  <pre><code>const array = [
    {
      name: 'Rafael',
      errors: [ 1, 2 ]
    },
    {
      name: 'Rafael',
      errors: [7]
    },
    {
      name: 'Joao',
      errors: [ 8 ]
    }
  ]
  </code></pre>
  <p>I trying to have the response like this:</p>
  <pre><code>const response = [
    {
      name: 'Rafael',
      errors: [ 1, 2, 7]
    }, {
      name: 'Joao',
      errors: [8]
    }
  ]
  </code></pre>
  <p>Does anyone have idea to how to do this? I tried to use groupBy of lodash, but I couldnt obtain the response I what</p>