I want to know about this function

We are saving array of objects in mongodb document

so course.authors is an array

i want to know about .id() function of array

Solved :

I have found this in mongoose docs

https://mongoosejs.com/docs/api/mongoosedocumentarray.html#mongoosedocumentarray_MongooseDocumentArray-id

1 Like