Hey guys im tryting to get fields that you only get with ?populate=* in a deeper level
Background: I have a forum with topics. Each topic can have Contributions, so i created a n:m relation
Now im trying to display all Contributions for each topic so my fetch looks like this:
fetch(`http://localhost:1337/api/topics/${this.themeId}?populate=*`, { headers })
.then(response => response.json())
.then(topic => {
console.log(topic.data.attributes)
const topicContributions = topic.data.attributes.topic_contributions;
})
.catch(error => console.error("Error:", error));
when console logging “topicContributions” i get an array for topic:contributions like this
Problem: I dont get the populated content from topicContributions. For example people can upload a featured Image for their Contribution. That field is missing but crucial for my lists of contributions.
Any idea?