Possible Duplicate:
I have a nested data structure / JSON, how can access a specific value?
I have a JSON data that is in the below format. I need to get the store name corresponding to the one which has specialDeal as true in "Non Veg". (NOTE: Only one of the stores will have specialDeal as true) How will i retrieve it. Please help. thanks in advance .. Please help me as i am just learning Java.
{"Food":
{
"Veg":
{
"amtSpent":"", "shortDesc":"", "longDesc":"", "excTxt":"",
"discntType":"", "Store":"", "StoreType":"", "Fund":"",
"FundDetails":[
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""},
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""}
]
},
"Non Veg":
{
"chicken":
[
{
"amtSpent":"", "shortDesc":"", "longDesc":"", "excTxt":"",
"discntType":"", "Store":"", "StoreType":"", "Fund":"",
"specialDeal":"", "promoStatus":"",
"FundDetails":[
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""},
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""}
]
},
{
"amtSpent":"", "shortDesc":"", "longDesc":"", "excTxt":"",
"discntType":"", "Store":"", "StoreType":"", "Fund":"",
"specialDeal":"", "promoStatus":"",
"FundDetails":[
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""},
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""}
]
}
],
"fish":
[
{
"amtSpent":"", "shortDesc":"", "longDesc":"", "excTxt":"",
"discntType":"", "Store":"", "StoreType":"", "Fund":"",
"specialDeal":"", "promoStatus":"",
"FundDetails":[
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""},
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""}
]
},
{
"amtSpent":"", "shortDesc":"", "longDesc":"", "excTxt":"",
"discntType":"", "Store":"", "StoreType":"", "Fund":"",
"specialDeal":"", "promoStatus":"",
"FundDetails":[
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""},
{"status":"", "discntVal":"", "FundVal":"", "FundBal":""}
]
}
],
"egg":
[
{
"amtSpent":"", "shortDesc":"", "longDesc":"", "excTxt":"",
"discntType":"", "Store":"", "StoreType":"", "Fund":"",
"specialDeal":"", "promoStatus":"",
"discntVal":"", "FundVal":"", "FundBal":""
},
{
"amtSpent":"", "shortDesc":"", "longDesc":"", "excTxt":"",
"discntType":"", "Store":"", "StoreType":"", "Fund":"",
"specialDeal":"", "promoStatus":"",
"discntVal":"", "FundVal":"", "FundBal":""
}
]
},
"isMember":"Y",
"orderId":""
}