I am using Google Maps API with jQuery getJSON:
$.getJSON(requestUrl, function(data) { var distance = //need to parse value from \'data\' object here
$.getJSON(requestUrl, function(data) { var distance = data.rows[0].elements[0].distance.text; });
Pretty simple, but I do want to know if you'll ever get more then one row or element from your function?