I have JSON in this format.
I can't figure out this problem 
I am using Object.values and object.keys with Array.prototype.map() but anything my algorithm didn't do what i want.

```
[
{
"2018-01-01": [
  {
    "firstname": "mati",
    "lastname": "mati",
    "userid": null,
    "total_minutes": 0,
    "free_minutes": 480,
    "task_date": "2018-01-01"
  },
  {
    "firstname": "andrzej",
    "lastname": "owsianka",
    "userid": null,
    "total_minutes": 0,
    "free_minutes": 480,
    "task_date": "2018-01-01"
  },
  {
    "firstname": "asd",
    "lastname": "asd",
    "userid": null,
    "total_minutes": 0,
    "free_minutes": 480,
    "task_date": "2018-01-01"
  }
],
"2018-01-02": [
  {
    "firstname": "mati",
    "lastname": "mati",
    "userid": null,
    "total_minutes": "70",
    "task_date": "2018-01-02",
    "free_minutes": 410
  },
  {
    "firstname": "andrzej",
    "lastname": "owsianka",
    "userid": null,
    "total_minutes": "360",
    "task_date": "2018-01-02",
    "free_minutes": 120
  },
  {
    "firstname": "asd",
    "lastname": "asd",
    "userid": null,
    "total_minutes": "30",
    "task_date": "2018-01-02",
    "free_minutes": 450
  }
],
"2018-01-03": [
  {
    "firstname": "mati",
    "lastname": "mati",
    "userid": null,
    "total_minutes": "0",
    "task_date": "2018-01-03",
    "free_minutes": 480
  },
  {
    "firstname": "andrzej",
    "lastname": "owsianka",
    "userid": null,
    "total_minutes": 0,
    "free_minutes": 480,
    "task_date": "2018-01-03"
  },
  {
    "firstname": "asd",
    "lastname": "asd",
    "userid": null,
    "total_minutes": 0,
    "free_minutes": 480,
    "task_date": "2018-01-03"
  }
]
}
]

```

I want get JSON in this format or very similar to this format

```
[
{
"firstname": "mati",
"lastname": "mati",
"2018-01-01": "480",
"2018-01-02": 480,
"2018-01-03": 480
},
{
"firstname": "andrzej",
"lastname": "owsianka",
"2018-01-01": "480",
"2018-01-02": 480,
"2018-01-03": 480
},
{
"firstname": "asd",
"lastname": "asd",
"2018-01-01": "480",
"2018-01-02": 480,
"2018-01-03": 480
}
]

```

How I have to map data to get something like that ?
I fight with that about 2 hrs but, I didn't invent anything sense.