JSON format leads to .map is not a function

I could see the whole API is an object instead of an array. map() won’t work for that.

I destructured data from the API and it works:

 const { data } = await res.json();

That data is an array inside of whatever your API name is.