Trying to fetch data from an API but I keep getting .map is not a function :(
Answered
Ojos Azules posted this in #help-forum
Ojos AzulesOP
I'm trying to get some data from my Strapi but for some reason, I keep getting the error "skills.map is not a function". I have been reading around and this seems to be an issue because objects cannot be mapped, but I don't understand what I have to change with my code. I will attach my code and the console log of the data I'm fetching. If someone could please help me out that would be amazing.
4 Replies
@joulev skills.data.map instead of skills.map
Ojos AzulesOP
thank you that actually works 😠. One more question now, how would I make an interface or type work with the skill?
@Ojos Azules thank you that actually works 😠. One more question now, how would I make an interface or type work with the skill?
create a new thread if its a different problem
Ojos AzulesOP
oh okay my bad. thanks againnn