My data:

```
[{
    id: 1,
    name: 'foo'
  }, {
    id: 2,
    name: 'bar'
  }, {
    id: 1,
    name: 'foo'
  }
];

```

I want to do something like this:

```
[
  {
    name: "foo",
    id: 1,
    count: 2
  },
  {
    name: "bar",
    id: 2,
    count: 1
  }
]

```

Now i'm grouping the elements with `groupBy` by name.

Thanks for the help!