I'm trying to create the following query in Python for a connection I have to MongoDB.
db.deal.find({"id":"11223|14589"})
By using the writing the following code:
import json
unique_id = "11223|14589"
query = json.dumps({"id":"%s"}) %(unique_id)
Unfortunately, this creates a string, and the results I don't get any returned results from MongoDB. Querying manually using the string that is created in variable query actually returns results. Anyone know what I might do to get this working from pymongo?