title: How to access deep JSON element in Java
body: <p>i have the following JSON response:</p>
  
  <pre><code>{
     "destination_addresses" : [ "Berlin, Deutschland" ],
     "origin_addresses" : [ "Mannheim, Deutschland" ],
     "rows" : [
        {
           "elements" : [
              {
                 "distance" : {
                    "text" : "624 km",
                    "value" : 624195
                 },
                 "duration" : {
                    "text" : "5 Stunden, 53 Minuten",
                    "value" : 21156
                 },
                 "status" : "OK"
              }
           ]
        }
     ],
     "status" : "OK"
  }
  </code></pre>
  
  <p>MY question is: How do I access the "text" Element in the "distance" section?</p>
  
  <p>I have the following right now:</p>
  
  <pre><code>JSONObject object = (JSONObject) new JSONTokener(response).nextValue();
  JSONArray rows= null;
  rows= object.getJSONArray("rows");
  </code></pre>