pymongo query returns value or not -


result = db.nps.find({"customer_name": account}, { "_id": 0 })

i want check if result empty or not without iterating results

for e.g:

if result:

any appreciated

use find_one instead. find_one returns none if there no result.


Comments

Popular posts from this blog

python - Alternative to referencing variable before assignment -

vb.net - How to ignore if a cell is empty nothing -

Sort a complex associative array in PHP -