On Fri, 31 Jul 2015 08:07:23 +0200, dieter wrote: > Keep in mind that Python is a (more or less) "general purpose" language > which does not know about "jsonquery". It has "and", "or" and "not" > operators (defined in the language reference) *BUT* these are not the > operators you are looking for. > You will need a special "jsonquery" extension (search > "http://pypi.python.org" to find out whether there is something like > this) > which would provide appropriate support.
Actually it's not too hard. You can construct the json query syntax fairly easily from python once you understand it: >>> import json >>> query = json.dumps( { "$and":[ { "$gt": {"age": 5} }, { "$not": {"name": "curly"} } ] } ) >>> query '{"$and": [{"$gt": {"age": 5}}, {"$not": {"name": "curly"}}]}' -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list