Complete the code to find all documents in the collection.
db.collection.[1]()The find() method retrieves all documents from a MongoDB collection, similar to selecting rows in SQL.
Complete the code to insert a new document into the collection.
db.collection.[1]({ name: 'Alice', age: 30 })
The insertOne() method adds a single document to a MongoDB collection.
Fix the error in the query to find documents where age is greater than 25.
db.collection.find({ age: { [1]: 25 } })The operator $gt means 'greater than' in MongoDB queries.
Fill both blanks to update the age of a document where name is 'Bob'.
db.collection.updateOne({ name: 'Bob' }, { [1]: { age: [2] } })The $set operator updates the value of a field. Here, age is set to 35.
Fill all three blanks to create a document with nested address information.
db.collection.insertOne({ name: 'Eve', address: { [1]: '123 Main St', [2]: 'Springfield', [3]: 'IL' } })The document has nested fields: street, city, and state inside the address object.
