I am trying to save the results from model.findOne() on a variable for using the results on another function. But what I get on the variable is only a pending promise:
let key = Product.findOne({ name: 'keyboard' }).then(data => { return data });
console.log(key);
and what I see on mongo shell:
Promise { <pending> }