How can I concat JSON objects if the first object is:
{
     "total": "2"
}
And second:
[
     "player1": {
          "score": "100",
          "ping": "50"
     },
     "player2": {
          "score": "100",
          "ping": "50"
     }
]
If I want final result to look like:
{
     "total": "2",
     {
          "player1": {
               "score": "100",
               "ping": "50"
          },
          "player2": {
               "score": "100",
               "ping": "50"
          }
     }
}
I am trying to do it in JavaScript.
Update
The final result is not a valid array. What about this?
{
     [
          "player1": {
               "score": "100",
               "ping": "50"
          },
          "player2": {
               "score": "100",
               "ping": "50"
          }
     ]
}
