Here is a collection of common NoSQL queries and the mongodb commands needed for them:
1. Exact Match
Collection Name: users
Object Field: first_name
Search for: Kaye
db.getCollection('users').find({"first_name":"Kaye"})
2. Like Match
Collection Name: users
Object Field: last_name
Search for: varad
db.getCollection('users').find({"last_name":/varad/})
Top comments (0)