Re: Dynamic query in mongodb and variable

2016-07-11 Thread Chris Angelico
On Mon, Jul 11, 2016 at 10:52 PM, MG wrote: > Ciao, > I have this function: > > > def lockup_info(refer): > info = [] > amb = CONN.db..find({"reference": refer} > for a in amb: > print a > > > > How can I pass this value { "$exists": False } and tell pyt

Dynamic query in mongodb and variable

2016-07-11 Thread MG
Ciao, I have this function: def lockup_info(refer): info = [] amb = CONN.db..find({"reference": refer} for a in amb: print a How can I pass this value { "$exists": False } and tell python to not consider it as a string? var = '{ "$exists": Fals