I have got this as response
[
{
"name": "Large, 100 Ml",
"image": "http://hostip:8080/OrderSnacks/JSON_images/icecream_cup_vanilla.jpg",
"quantity": "1",
"price": "75",
"toppings": []
},
{
"name": "Regular, 50 Ml",
"image": "http://hostip:8080/OrderSnacks/JSON_images/icecream_cup_vanilla.jpg",
"quantity": "2",
"price": "150",
"toppings": [
{
"name": "Regular, 50 Ml0",
"value": [
"Honey with Chocolate Sauce 10 ML"
]
},
{
"name": "Regular, 50 Ml1",
"value": [
"Honey with Chocolate Sauce 10 ML",
"Honey with Carmel 10 ML"
]
}
]
}
]
How can i read the toppings array values ??
I tried to read this way
for (var n = 0; n < toppins.values.length; n++)
{
alert(toppins.values[n]);
}
But it is giving errror can't read property of undefined
could anybody please help me on this .
toppinsortoppings? Also, there are two layers above it.toppingsis an array. It doesn't have avalueproperty, its elements do.