I am making a simple GET request and filling up a webpage with some data. Every other line works except for 'addresses' which contains two arrays, and on my webpage it prints out '[object Object]', instead of the data. Here is an example of the JSON (apologies for the poor formatting):
data: Array(7)
0:
addresses: Array(2)
0:
city: "Houghton"
line1: "800 East Lakeshore Drive"
line2: ""
line3: ""
postalCode: "49931"
stateCode: "MI"
type: "Physical"
proto: Object
Here is the code block where I try to access 'addresses':
for (let i = 0; i < parkData.length; i++) {
$("#results-list").append(`<h2>${parkData[i].fullName}</h2>
<p>${parkData[i].addresses[0]}</p>
<a href=${parkData[i].directionsUrl}>Directions</a><br>
<a href=${parkData[i].url}>Website</a>
<p>${parkData[i].description}</p>
Like I said above, all of the other lines work but when I try to get the first index of addresses I just get that weird Object response. Any ideas? Thank you!
parkDataobject