I am using Google Maps API with jQuery getJSON:
$.getJSON(requestUrl, function(data) { var distance = //need to parse value from \'data\' object here
data.rows.forEach(function(value){ value.elements.forEach(function(childValue) { console.log(childValue.distance.text); }); });
The above nested forEach should get you the distance value.
forEach