I am trying to retrieve images from an API, but I'm having trouble accessing all the arrays to get to the data. Currently, I am only able to fetch the posts arrays in a single call and not beyond that. https://i.stack.imgur.com/aFWlD.jpg
My method for fetching data looks like this:
getPostImages = () => {
fetch (this.apiKey).
then(response => {
if (response.ok) {
return response.json();
};
}).then((j: any) =>
{ console.log(j.data.post);
});
}
Any advice on how to access all the arrays in order to retrieve the images? Thank you.