I am using nextjs, React and Typescript. I want to loop out values from an array of objects. My
data.json:
[
{
"id": "value”,
“name": “value”,
“type”: “value”
},
{
"id": “value”,
“name": “value”,
“type": “value”
}
]
cars.map is not a function.
carsarray. Why can't you do something likecars.map(car => Object.keys(car) ...)?JSON.parse(cars)then you should have a real array.