I am using google maps API to get a city name from coordinates. When I fetch the API url I get an empty json
unction callWCoords(position) {
let latitude = position.coords.latitude;
let longitude =position.coords.longitude;
let call1;
let API1="https://maps.googleapis.com/maps/api/geocode/json?latlng=+"+latitude+","+longitude+"&key=AIzaSyAfH3Ypu0Al8HpNRXhOPEzGLeNbkxOlsoI"
fetch(API1).then(
response=>{alert(JSON.stringify(response));
}).then( data=>{
})
//getPlaceC(call1);
}
JSON.stringfy(response) returns "{}" as well if I try JSON.stringfy(data) in the second .then block. Since in the official google json I should get an array called results I tried to substitute results with data but it didn't work.