I'm working on an android project where I have to show some items in response of a request I'll send to server using provided API.
I'll get an JSON object in response which contains a JSON array as one of the elements inside of it.
My problem is the JSON array may have several JSON objects inside of it and how to handle this situation is beyond my knowledge.
"Details": [
{
"OrderId": 7615,
"ProductId": 1292406,
"ProductImageFormat": "jpg",
"ProductImageId": 1752,
"ProductImageUrl": "",
"ProductOrgImageUrl": "",
"ProductLargeImageUrl": "",
"ProductName":""
"ProductSlug": ""
"ProductSubTitle": ""
"Quantity": 1,
"UnitPrice": 8300
},
{
"OrderId": 7615,
"ProductId": 23568452,
"ProductImageFormat": "jpg",
"ProductImageId": 1895,
"ProductImageUrl": "",
"ProductOrgImageUrl": "",
"ProductLargeImageUrl": "",
"ProductName":""
"ProductSlug": ""
"ProductSubTitle": ""
"Quantity": 1,
"UnitPrice": 3500
}
]
I may get several of this single object with different values in one Array as you can see above.
Is there anything I can do about this?
EDIT: what I mean is that the array size is dynamic and I don't know how to handle dynamic sized JSON array