I am new to python and mongo db, i have a dict called data and i wanna use the keys to query the database called db.
def update_db(data, db):
for key in data:
x=db.find({'label':key})
for a in x:
print a
I get the error message that find() does not exist.
Anyone can give me input on my problem ?
collectionis mongo's "version" of a table. You need to query against the actual collection and not the database.db.collection_name.find()