I need to save a value from a JSON object in a global variable for future use in my code. Despite trying to declare the country
variable as global, it seems like it doesn't actually work.
$.getJSON(reverseGeoRequestURL, function(reverseGeoResult){
window.country = reverseGeoResult.results[0].locations[0].adminArea1;
});
console.log(window.country);