I have a JSON object that is returned from the WS which will have a sample of below:
{
"MenuID": 5,
"MenuVersion": 1,
"MenuName": "Lunch Menu",
"MenuItems": [
{
"Name": "TUSCANI MEDITERRANEAN CON POLLO",
"Description": "Pasta",
"PKID": 2,
"ParentID": 1,
"Ingredients": [
{
"PKID": 123,
"IngName": "Cheese",
"Included": true,
"ExtraPrice": 0},
{
"PKID": 124,
"IngName": "Sausage",
"Included": false,
"ExtraPrice": 0.99}
],
"ItemPricing": [
{
"PKID": 456,
"SizeName": "Large",
"SizePrice": 12.99},
{
"PKID": 678,
"SizeName": "Small",
"SizePrice": 14.99}
]}
]
}​
Are there any examples on how to work with complex objects like these. (Loop through the Menu items in this example and being able to display required info.) . I need to dynamically display the prices or ingredients to the user based on what is selected. I will be having more than one Menu Item to work with.
Thanks,
Chandu
{
"MenuID": 5,
"MenuVersion": 1,
"MenuName": "Lunch Menu",
"MenuItems": [
{
"Name": "TUSCANI MEDITERRANEAN CON POLLO",
"Description": "Pasta",
"PKID": 2,
"ParentID": 1,
"Ingredients": [
{
"PKID": 123,
"IngName": "Cheese",
"Included": true,
"ExtraPrice": 0},
{
"PKID": 124,
"IngName": "Sausage",
"Included": false,
"ExtraPrice": 0.99}
],
"ItemPricing": [
{
"PKID": 456,
"SizeName": "Large",
"SizePrice": 12.99},
{
"PKID": 678,
"SizeName": "Small",
"SizePrice": 14.99}
]}
]
}​
Are there any examples on how to work with complex objects like these. (Loop through the Menu items in this example and being able to display required info.) . I need to dynamically display the prices or ingredients to the user based on what is selected. I will be having more than one Menu Item to work with.
Thanks,
Chandu