Tell us what’s happening:
Can someone help me with this issue. It won’t pass the test with anything I’ve tried so far. Sometimes it just prints the iconic [object Object] in the logs and that is it. I tried many different methods but none actually passed the test. I took code from the official hint, the forum, stackoverflow and the official wiki. Tried everything I could find and it just won’t work. Help would be kindly appreciated.
Your code so far
var findPeopleByName = function(personName, done) {
Person.find({name: personName}, function(err, data){
if(err) return console.log(err);
done(null, data);
});
};
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
.
Challenge: Use model.find() to Search Your Database
Link to the challenge: