Hi , I have a JSON object of following type : { "time": "14040404.550055", "Food_24ww": { "Grains" : { "status" : "OK", "report": { "...
See more...
Hi , I have a JSON object of following type : { "time": "14040404.550055", "Food_24ww": { "Grains" : { "status" : "OK", "report": { "2014": { "type" :"rice", "prod" : "50", "rate" : "30" }, "2015": { "type": "pulses", "prod" : "50", "rate" : "30" } } }, "Beverages" : { "status": "Good", "2014": { "type" :"pepsi", "prod" : "50", "rate" : "60" }, "2015": { "type": "coke", "prod" : "55", "rate" : "30" } } } } I want to extract all the key values inside "report" key for "Grains" and "Beverages". Means , for Grains , I want 2014 (and key values inside it), 2015 (and key values inside it) , similarly for Beverages. Now the challenge is none of the JSON keys until "reports" are constant. The first key "Food_24ww" and the next level "Grains" and "Beverages" are not constant. Thanks