How can I use destructuring to create a new object that deep copies this:
{
"data": [
{
"type": "b",
"id": "2",
"other": {
"name": "hello"
}
}
]
}
and spits out one of these:
{
"data": {
"type": "b",
"id": "2",
"other": {
"name": "hello"
}
}
}
}