I have google API, it return a JSON file
http://maps.googleapis.com/maps/api/geocode/json?latlng=10.75,106.667&sensor=false
I want to get "long_name" : "H? Chí Minh", "long_name" : "Vi?t Nam" and "short_name" : "VN"
I don't know JSON, I do like this
var API = 'http://maps.googleapis.com/maps/api/geocode/json?latlng=10.75,106.667&sensor=false';
//this function add the long_name
function addLongName(data) {
var long_name = data.results[0].address_components[5].long_name;
document.getElementById("City").appendChild(document.createTextNode(long_name));
}
var ajax = $.ajax({
...
Go to the complete details ...