Complete the code to find all documents in the collection.
db.collection.find([1])Using an empty object {} as the query returns all documents in the collection.
Complete the code to find documents where age is 25.
db.collection.find({ age: [1] })Use the number 25 without quotes to match the age field exactly.
Fix the error in the query to find documents with name 'Alice'.
db.collection.find({ name: [1] })String values in MongoDB queries must be in double quotes.
Fill both blanks to find documents where age is greater than 30.
db.collection.find({ age: { [1]: [2] } })The operator $gt means 'greater than', so { age: { $gt: 30 } } finds ages over 30.
Fill all three blanks to find documents where name starts with 'J' and age is less than 40.
db.collection.find({ name: { [1]: [2] }, age: { [3]: 40 } })Use $regex with "^J" to match names starting with 'J', and $lt to find ages less than 40.
