Currently, I am facing the challenge of mapping complex models.
- My data consists of an array of Carts with attributes such as id and name.
- In addition, there is a dictionary where each key represents a type and its corresponding value includes different products.
For visualization purposes, I have included a sample output at the bottom of this page.
Although I have made some progress in my attempt, I am currently stuck on how to effectively filter the data.
carts.forEach(cart => {
const productList = cart.products; //list of products
Object.entries(content.data).forEach(([key, values]) => {
const sizeList = values.map(x => x.sizeList); //list of size
// i am stuck here
});
});