I need to sort the given "document" array with "lastname". Here is the sample json
document [
{
id:"100"
person :{
name : {
firstname : "xyz",
lastname : "oops"
},
photourl: "photo-url"
}
},
{
id:"200"
person :{
name : {
firstname : "xyz",
lastname : "oops"
},
photourl: "photo-url"
}
}]
it has an dict "name" inside one more dict "person" and we need to sort with lastname first n then with lastname