【发布时间】:2011-08-14 10:05:03
【问题描述】:
User.findOne({}, function(err, doc){
//do stuff with "doc" here.
});
这就是我目前的做法。但是,如果我想拿“doc”,然后做点什么。
User.findOne({}, function(err, doc){
//do stuff with "doc" here.
});
runAnotherFunction(doc.name)
doc...
如何将“doc”从“function”部分中取出?
【问题讨论】:
标签: javascript mongodb node.js mongoose