title: How to extract the distance from a Google Directions JSON file on the iphone
body: <p>I am having a really hard time extracting a single value I need from a JSON file I get from a Google Directions request.</p>
  
  <p>After sending the request, I get something like that:</p>
  
  <pre><code>{
     "routes" : [
        {
           "bounds" : {
              "northeast" : {
                 "lat" : 31.831330,
                 "lng" : 34.834710
              },
              "southwest" : {
                 "lat" : 31.25299000000001,
                 "lng" : 34.653460
              }
           },
           "copyrights" : "Map data ©2012 Mapa GISrael",
           "legs" : [
              {
                 "distance" : {
                    "text" : "85.6 km",
                    "value" : 85613",
                 },
  </code></pre>
  
  <p>But the only thing I want is the distance value (routes/legs/distance/value),
  does any one know how to extract this value from the JSON file?</p>