'Populate Nested Array without Objects In Mongoose?
I have the following document as an example:
[
{
_id: ObjectId("6206bb93686af95e81f45afa"),
steps: [
[
'6206bb87686af95e81f45af9',
'6206bb7a686af95e81f45af8',
'6206bb7a686af95e81f45af8'
],
[ '6206bb7a686af95e81f45af8', '6206bb87686af95e81f45af9' ],
[ '6206bb87686af95e81f45af9' ]
],
name: 'name',
desc: 'desc',
__v: 0
}
]
I want to populate each id inside the nested steps with another Model. I do not have any Object keys here so I assume I can't use Mongoose populate chain syntax. How am I supposed to achieve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
