I have an array of widgets
containing multiple objects. Each object contains an array called cards
which contains just a single object. I need help with extracting all the cards
object and making a new cards
array containing all the cards as elements
{
"widgets" : [
{
"type": "Grid",
"cards": [
{
"data": {},
"layout": 1
}
]
},
{
"type": "Grid",
"cards": [
{
"data": {},
"layout": 1
}
]
}
]
}
How I want is
{
"widgets": [
{
"type": "Grid",
"cards": [
{
"data": {},
"layout": 1
},
{
"data": {},
"layout": 1
}
]
}
]
}