Objects, {} in JavaScript do not have the method .map(). It’s only for Arrays, [].
So in order for your code to work change data.map() to data.products.map() since products is an array which you can iterate upon.
Objects, {} in JavaScript do not have the method .map(). It’s only for Arrays, [].
So in order for your code to work change data.map() to data.products.map() since products is an array which you can iterate upon.