I get a certain response from the server which looks like so...
[
    {
        "theCode": A12345,
        "id": 2980,
        "name": “HELLO”
    },
    {
        "theCode": A12345,
        "id": 2986,
        "name": "HELLO THERE”
    },
    {
        "theCode": A12345,
        "id": 2987,
        "name": "HOW ARE YOU”
    }
]
Once the api is called, I store the above data in an array. It is given like so...
if let myArray = (sdfg["entries"] as? NSMutableArray) {
    print(myArray) 
} 
I would like the name in the above response to be sorted in ascending order based on the id. How can this be achieved...?
 
     
    