What's the fastest way to check for the existence of a mongodb doc?

Kadava

New Member
What's the fastest way to check for the existence of a mongodb doc?Should I just use find and if it returns nothing?EDIT: \[code\]collection.findOne {#attribute}, (err, doc) -> if err then console.log err if interaction #exists else #does not\[/code\]
 
Top