JavaScript-How to get a value from a Json array having multiple nodes and arrays?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/11922383/i-have-a-nested-data-structure-json-how-can-access-a-specific-value">I have a nested data structure / JSON, how can access a specific value?</a>  </p>
</blockquote>



<p>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.</p>

<pre><code> {"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":""
</code></pre>

<p>}</p>
