A REST API which I use returns this data format:
const documents = [
{
"fields": {
"title": {
"stringValue": "77"
},
"difficulty": {
"doubleValue": 77
},
},
"createTime": "2020-04-10T15:13:47.074204Z"
},
{
"fields": {
"title": {
"stringValue": "99"
},
"difficulty": {
"doubleValue": 99
},
},
"createTime": "2020-04-10T15:13:47.074204Z"
}
]
What I need is this format:
{
title: "77",
difficulty: 77
},
{
title: "99",
difficulty: 99
}
Which means I have to not only group this data but entirely remove two layers in the middle. How do I do that?
As a bonus: How do I get better at this? Are there any good resources?