My json data currently looks like this:
[
{
"timestamp": 345345,
"status": {
"code": 200,
"success": true,
"message": "Success",
"errors": []
},
"size": 1,
"nameList": [
{
"id": 74997
"status": "pending"
}
]
},
{
"timestamp": 45,
"status": {
"code": 200,
"success": true,
"message": "OK",
"errors": []
},
"size": 5,
"content": [
{
"id": 1260087,
"pilot": "Jujuki",
"nameId": 4343,
"RefId": "3453454"
}
]
}
]
How do I split up this object into 2 different object/arrays of data. I want everything with index 0 to go into the first new object, and everything with index 1 to go into the second new object. What would be best es6 syntax method to use.