returning undefined for get request

mongoose.model.prototype.find returns an array of objects found. If you type Array.prototype.name in a console somewhere, you’ll get undefined. Instead, use mongoose.model.prototype.findOne.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top