You need to sign in to do that
Don't have an account?
Mr Woda
help with this task
Create inner class with comparator (by lastName asc) for parsing this json:
[{"lastName" : "Perucci", "firstName" : "John", "title" : "guitarist" },{"lastName" : "LaBrie", "firstName" : "James", "title" : "singer"},{"lastName" : "Mabgini", "firstName" : "Mike", "title" : "drummer"},{"lastName" : "Myung", "firstName" : "John", "title" : "basist"}]
[{"lastName" : "Perucci", "firstName" : "John", "title" : "guitarist" },{"lastName" : "LaBrie", "firstName" : "James", "title" : "singer"},{"lastName" : "Mabgini", "firstName" : "Mike", "title" : "drummer"},{"lastName" : "Myung", "firstName" : "John", "title" : "basist"}]
Please try the below class:
To Execute:
Thanks,
Maharajan.C
All Answers
You will need to deserialize JSON with code similar to https://salesforce.stackexchange.com/questions/230777/getting-null-for-inner-classes-in-complex-json-deserialization
https://salesforce.stackexchange.com/questions/223121/how-to-use-json-class-as-a-inner-class-instead-of-seprate-class
Thanks
Please try the below class:
To Execute:
Thanks,
Maharajan.C