I'm trying to map but I don't manage to map orders here. It's written cannot read property of undefined but products work.
This is my class:
const p = products.map(p => {
return (
<Product
key={p._id}
product={p}
/>
);
});
const o = orders.map(o => {
return (
<div
key={o._id}
product={p}
/>
);
});
This is the console log of the object:
