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 is mongodb used?

1 Answers  


What is a namespace in mongodb?

1 Answers  


Is mongodb good for storing images?

1 Answers  


Is mongodb an orm?

1 Answers  


What is the use of mongodb compass?

1 Answers  


How mongodb works? Explain

1 Answers  


Is mongodb a documentdb?

1 Answers  


Mention how you can inspect the source code of a function?

1 Answers  


What are the uses of mongodb? Explain

1 Answers  


Explain can you move old files in the movechunk directory?

1 Answers  


How to insert image in mongodb database?

1 Answers  


What will happen when you remove a document from database in mongodb? Does mongodb remove it from disk?

1 Answers  


Categories