title: Get specific value from JSON response
body: <p>I have this response from Google Maps Distance Matrix API:</p>
  
  <pre><code>{
     "destination_addresses" : [ "334-350 Hicks St, Brooklyn, NY 11201, USA" ],
     "origin_addresses" : [ "565-569 Vermont St, Brooklyn, NY 11207, USA" ],
     "rows" : [
        {
           "elements" : [
              {
                 "distance" : {
                    "text" : "6.5 mi",
                    "value" : 10410
                 },
                 "duration" : {
                    "text" : "34 mins",
                    "value" : 2045
                 },
                 "status" : "OK"
              }
           ]
        }
     ],
     "status" : "OK"
  }
  </code></pre>
  
  <p>How to exactly get the "6.5 mi" value?</p>
  
  <p>I tried this but doesn't work:</p>
  
  <pre><code>$distance = $response_a['rows'][0]['elements'][0]['distance']['text'];
  </code></pre>