0

How can i pass array of condtions in mongokit find query.

Untill now , i am implementing queries like :

data = db.entry.find({'title':{'$regex':'test'},'status':{'$regex':'active'}}).limit(3);

Condtions are bound to increase. Is there any way i can pass an array of conditions?

Engineer
  • 5,911
  • 4
  • 31
  • 58

1 Answers1

0
conditions = {'title':{'$regex':'test'},'status':{'$regex':'active'} ..... other conditions }
data = db.entry.find(conditions).limit(3);
DhruvPathak
  • 42,059
  • 16
  • 116
  • 175