Google Maps InfoWindow only displaying last element in JSON array

I am trying to display a title in each markers info window that will display the name of the event. Right now I only can display the very last elements name in the JSON array, and am unsure how to make the others their event title. Any help is appreciated, thanks! I would also like to eventually show along with the event name a couple other elements such as “eventPhone” etc.

The info window only showing last element: (Santa clause parade is title of every marker for some reason)

45 PM

what the array looks like:

12 PM

My add markers function:

for(let marker of markers)
var loc = marker.calEvent.locations[0]['coords'];
var name = marker.calEvent['eventName'];

console.log(name); //displays name of each event within this object

marker = new google.maps.Marker({
position: loc,


var infoWindow = new google.maps.InfoWindow({

content: name

google.maps.event.addListener(marker, 'click', function () {, marker);


JSON feed: