I have an array with two objects, I want to be able to swap the key values of the two objects..
"people":[
{
"name":"bob",
"lastname": "johnson",
"slot_id": 1
},
{
"name":"terry",
"lastname": "lucas",
"slot_id": 2
},
]
I would like to be able to swap the two slot_id's like so..
"people":[
{
"name":"bob",
"lastname": "johnson",
**"slot_id": 2**
},
{
"name":"terry",
"lastname": "lucas",
**"slot_id": 1**
},
]
thanks in advance!