Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在mongokit 查找查询中传递条件数组。
直到现在,我正在实现如下查询:
data = db.entry.find({'title':{'$regex':'test'},'status':{'$regex':'active'}}).limit(3);
条件必然会增加。有什么办法可以通过一系列条件吗?
conditions = {'title':{'$regex':'test'},'status':{'$regex':'active'} ..... other conditions } data = db.entry.find(conditions).limit(3);