I have a response like this:
I want to display the name of each object inside this HTML:
{subjects.map((item, i) => (
You get this error because your variable subjects is an Object not Array, you can use map() only for Array.
subjects
Object
Array
map()
In case of mapping object you can do this:
{ Object.keys(subjects).map((item, i) => ( { subjects[item].name } )) }