Parsing Json Data

Oct 25, 2010 at 11:42 AM
Edited Oct 25, 2010 at 1:37 PM

Hi all 

i am new in json topic and dont have so much idea about.

i  am using map API and  am getting the data in json format and now i want to parse the json string.

{  status : "OK",  "routes": [ {    "summary": "Route",    "legs": [ {      "steps": [ {        "travel_mode": "DRIVING",        "start_location": {          "lat": 30.7262300,          "lng": 76.8562400        },        "end_location": {          "lat": 30.7259300,          "lng": 76.8556700        },        "polyline": {          "points": "}epzDo~atMz@pB",          "levels": "BB"        },        "duration": {          "value": 8,          "text": "1 min"        },        "html_instructions": "Head \u003cb\u003esouthwest\u003c/b\u003e",        "distance": {          "value": 64,          "text": "64 m"        }      }, {        "travel_mode": "DRIVING",        "start_location": {          "lat": 30.7259300,          "lng": 76.8556700        },        "end_location": {          "lat": 30.7275800,          "lng": 76.8545800        },        "polyline": {          "points": "adpzD}zatMiIxE",          "levels": "BB"        },        "duration": {          "value": 37,          "text": "1 min"        },        "html_instructions": "Turn \u003cb\u003eright\u003c/b\u003e",        "distance": {          "value": 210,          "text": "0.2 km"        }      }, {

i am getting string in this format.  i want to get the property name and value , how can i get this. 

e.g. if i want the value of distance then how can i get it.. 

please help me in this matter.. 

thanks in advance