I wanted to access the ends_on data from that array of objects...but i can't get it work. The output is undefined. Pls do help me out.
}).then((response) => response.json()) .then((result) => { console.log(result.eventData.ends_on); });
[Output of the code]
[Output of api in console.log]
eventData here is an Array, so you would have to access it like this:
eventData
Array
console.log(result.eventData[0].ends_on);