Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to populate multiple fields in mongoose?



How to populate multiple fields in mongoose?..

Answer / Mr Sumant Kumar

In Mongoose, you can use the populate method to populate multiple fields. To do this, pass an array containing the field names as a second argument to the populate method.nnexample: Model.findOne({}) .populate(['field1', 'field2']) .exec()

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MongoDB Interview Questions

how to do transactions/locking in mongodb?

1 Answers  


What is schema in mongodb?

1 Answers  


What is a covered query in mongodb?

1 Answers  


What is dynamic schema in mongodb?

1 Answers  


How to update operations immediately sync to disk in mongodb?

1 Answers  


What is a namespace in mongodb?

1 Answers  


What are documents in mongodb?

1 Answers  


How does mongodb store data on disk?

1 Answers  


Do mongodb databases have tables and schemas?

1 Answers  


in mongodb, What is crud?

1 Answers  


Is mongodb orm?

1 Answers  


What are journaling in mongodb?

1 Answers  


Categories