'Mongoose - populate nested array
I have done e-commerce store and I would like to populate product in orderProduct array. Currently I do like this:
.populate({
path: 'orderedProductArray',
populate: {
path: '0',
populate: {
path: 'product',
model: 'Cloth'
}
}
})
The problem is that I am not able to populate all objects included in orderProduct Array. Do you have any idea how can I adjust this? Thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

