var placesAPI = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=32.8400,-117.2769&radius=500&types=museum&sensor=true&key=my_key_here";
$.getJSON(placesAPI, function (json) {
var address = json.results[0].name;
console.log('Name : ', name);
});
I am trying the above code with no success. I do put in my API key and I get the json results on the webpage but when I try to parse them I get an error "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. "
How do I parse the JSON?