Complete the code to find all documents where the age is greater than 25.
db.users.find({"age": {"$gt": [1])The $gt operator means 'greater than'. We want ages greater than 25, so the value should be 25.
Complete the code to find documents where the status is either 'active' or 'pending'.
db.users.find({"status": {"$in": [1])The $in operator checks if the field matches any value in the array. We want 'active' or 'pending', so the array should include both.
Fix the error in the query to find users with name starting with 'J'.
db.users.find({"name": [1])To find names starting with 'J', use a regular expression /^J/. This matches strings beginning with 'J'.
Fill both blanks to find users older than 30 and with status 'active'.
db.users.find({"age": {"$gt": [1], "status": [2])The age should be greater than 30, so 30 is correct. The status should be exactly 'active', so use the string "active".
Fill all three blanks to find users with age less than 40, status 'pending', and name containing 'an'.
db.users.find({"age": {"[1]": [2], "status": "pending", "name": [3])Use $lt for 'less than' and 40 as the age limit. The name should match the regex /an/ to find 'an' anywhere in the name.