I have a nested weather json data:
{
"Temp": [{
"time": "2020-08-04T12:00:00Z",
"value": "12"
},
{
"time": "2020-08-04T13:00:00Z",
"value": "13"
}
],
"Humidity": [{
"time": "2020-08-04T12:00:00Z",
"value": "70"
},
{
"time": "2020-08-04T13:00:00Z",
"value": "73"
}
]
}
Now (using Lodash or any other recommendation) the challenge is to somehow group them by time, and pick only one item at a time for example:
{
"data": [{
"time": "2020-08-04T12:00:00Z",
"Temprature": "12",
"Humidity": "70"
},
{
"time": "2020-08-04T13:00:00Z",
"Temprature": "13",
"Humidity": "73"
}
]
}