Answer the question
In order to leave comments, you need to log in
How to correctly pass the array and enter a new field with an array?
result.map((item, index) => {
if(item.detailArticle === result[index++].detailArticle){
return {
id: item.makerId,
detailBrand: item.maker,
detailArticle: item.number,
detailName: item.description,
offers: result.map((itm) => {
if(item.makerId === itm.makerId) {
return itm.description
}
})
}
}
}))
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question