Mogo 一些语句

mongodb 的查询语法类似js:

var userCods = db.getCollection('items').aggregate([
{$match:{"userItem.userCode":"ACB"}},
{$project:{"userCode":1,"_id":0}}
])
userCods .forEach(function(item){ 
db.getCollection('USer-Files').find({"userCode":item.userCode}).forEach(function(item1){
print(item1.urlPath);
});
});

猜你喜欢

转载自www.cnblogs.com/feiqilai/p/12921324.html