How to Call dynamic nested json object in android using retrofit.I have a JSON result in the following format, My question is: how do I access the content of "categories" since "food", "fashion", etc are all dynamic values? just give me an idea.
{
"offer": {
"id": "JUN_HAIR_1302177631",
"categories": {
"electronics": {
"address_1": "12 Mott St",
"address_2": null,
"city": "New York",
"cross_streets": "Chatham Sq & Worth St",
"state": "NY",
"zip": "10013"
},
"food": {
"address_1": "12 Mott St",
"address_2": null,
"city": "New York",
"cross_streets": "Chatham Sq & Worth St",
"state": "NY",
"zip": "10013"
},
"fashion": {
"address_1": "12 Mott St",
"address_2": null,
"city": "New York",
"cross_streets": "Chatham Sq & Worth St",
"state": "NY",
"zip": "10013"
},
.........
.........
}
}
}