I'm struggling with pset8 quite a bit during the addMarker function. I try to access the JSON object returned from articles() but I can't seem to understand how to access it. I've tried JSON.parse(), toString(), and Stringify(). Nothing works. It either doesn't include anything in the infowindow or it just removes my markers. A link to my code is provided below. Could somebody please take a look? Thank you.
1 Answer
Use search
as your guide. This var json_data = $.getJSON(url);
returns a jqHXR
object, as per the jQuery documentation. You need a "callback" function (as in search
) to process the data. And don't forget to check the browser's console for errors!