For example with have this code:
var json = {
    "user1" : {
        "id" : 3
    },
    "user2" : {
        "id" : 6
    },
    "user3" : {
        "id" : 1
    }
}
How can I sort this json to be like this -
var json = {
    "user3" : {
        "id" : 1
    },
    "user1" : {
        "id" : 3
    },
    "user2" : {
        "id" : 6
    }
}
I sorted the users with the IDs..
I don't know how to do this in javascript..
 
     
     
     
     
     
    