Trying to convert from this:

```js
    const dataState = [
      { key: 1, name: 'First', quantity: 3, time: '13:7:2' },
      { key: 1, name: 'First', quantity: 2, time: '13:7:2' },
      { key: 3, name: 'Third', quantity: 23, time: '13:7:7' },
      { key: 1, name: 'First', quantity: 3343, time: '13:7:16' },
      { key: 3, name: 'Third', quantity: 443, time: '13:7:20' },
    ]

```

to

```js
  const dataState = [
    { key: 1, name: 'First', quantity: [3, 2, 3343], time: ['13:7:2', '13:7:2', '13:7:16'] },
    { key: 3, name: 'Third', quantity: [23, 443], time: ['13:7:7', '13:7:20'] },
  ]

```

So far i have done:

```js
const dataState = [
      { key: 1, name: 'First', quantity: 3, time: '13:7:2' },
      { key: 1, name: 'First', quantity: 2, time: '13:7:2' },
      { key: 3, name: 'Third', quantity: 23, time: '13:7:7' },
      { key: 1, name: 'First', quantity: 3343, time: '13:7:16' },
      { key: 3, name: 'Third', quantity: 443, time: '13:7:20' },
    ]

    let uniqueName = [...new Set(dataState.map((a) => a.name))]
    console.log('uniqueName', uniqueName)

    let name = []
    let quantity = []
    let time = []
    for (let i = 0; i < dataState.length; i += 1) {
      if ('First' === dataState[i].name) {
        name = name.concat(dataState[i].name)
        name = [...new Set(name)]
        quantity = quantity.concat(dataState[i].quantity)
        time = time.concat(dataState[i].time)
      }
    }
    console.log([{ name, quantity, time }])
```

Issue with my approach are:

1. Currently i have to manually set `First` or `Third`, `etc...`
2. Only loops for the value i have set example: `First`, so need more logic to create another object for `Third` and `etc...`

Please ignore that I'm using `name` property as key identifier i know i should be using `key` for this.