Searching for documents

db.getCollection('messages').find( {$where: "this.msg.length > 5", msg: /below /, incoming: true})

Lots of extra good examples here: https://docs.mongodb.com/manual/reference/sql-comparison/

back to main