Am looking to map through an array, take the key/value of a specified field, then merge it into the main object.

Currently my array looks like:

```
const data = [
   {
      "id": "3QXNO4SDo08FgAfQy3z5",
      "title": "Team One",
      "scores": [
         {
            "id": "DbkZljn22YSGVBLxiT4o",
            "score": 88
         },
         {
            "id": "v7ss2ypT4qf9RIvIynJp"
            "score": 5,
         }
      ]
   },
   {
      "id": "EmoL3dlPWpOPPiLixIYJ",
      "title": "Team Two",
      "scores": [
         {
            "id": "DbkZljn22YSGVBLxiT4o",
            "score": 77,
         },
         {
            "id": "v7ss2ypT4qf9RIvIynJp",
            "score": 0,
         }
      ]
   }
]

```

And I need to simplify it down to:

```
[
   {
      "id": "3QXNO4SDo08FgAfQy3z5",
      "title": "Team One",
      "DbkZljn22YSGVBLxiT4o": 88,
      "v7ss2ypT4qf9RIvIynJp": 5,
   },
   {
      "id": "EmoL3dlPWpOPPiLixIYJ",
      "title": "Team Two",
      "DbkZljn22YSGVBLxiT4o": 77,
      "v7ss2ypT4qf9RIvIynJp": 0,
   }
]

```

Taking the unique ID of the score and using it as my object key.

I imagine this requires nested looping to get the result. I would post my coding attempts, but they were seriously flawed and confusing.