I want to save a single Object to a variable
var query= user.findOne({ip:'127.0.0.1'});
var test= query.exec(function (err, user) {
if (err) return handleError(err);
return user.ip;
console.log('%s ', user.ip)
})
console.log(test);
The console.log is showing the right value while my test variable is showing something like {domain:null, _events....