Is there a way to restructure the following JSON data into a more organized format?
{
"rows": [{
"cells": [{
"value": "Column Name 1"
},
{
"value": "Column Name 2"
},
{
"value": "Column Name 3"
},
{
"value": "Column Name 4"
}
]
},
{
"cells": [{
"value": "Second Row Thing1"
},
{
"value": "Second Row Thing2"
},
{
"value": "Second Row Thing3"
},
{
"value": "Second Row Thing4"
}
]
},
{
"cells": [{
"value": "Third Row Thing1"
},
{
"value": "Third Row Thing2"
},
{
"value": "Third Row Thing3"
},
{
"value": "Third Row Thing4"
}
]
}
]
}
I would like to transform it into the following format:
{
"rows": [{
"Column Name 1": "Second Row Thing1",
"Column Name 2": "Second Row Thing1",
"Column Name 3": "Second Row Thing1",
"Column Name 4": "Second Row Thing1"
},
{
"Column Name 1": "Third Row Thing1",
"Column Name 2": "Third Row Thing1",
"Column Name 3": "Third Row Thing1",
"Column Name 4": "Third Row Thing1"
}
]
}
Would "normalizr" be able to achieve this restructuring, or should I explore using methods like "map", "foreach", and other array functions?