Complete the code to select only the 'name' field from the 'users' collection.
db.users.find({}, { [1]: 1 })To select only the 'name' field, you specify it with a value of 1 in the projection document.
Complete the code to exclude the 'password' field from the results.
db.users.find({}, { [1]: 0 })Setting a field to 0 in the projection excludes it from the results.
Fix the error in the code to select only 'name' and 'email' fields.
db.users.find({}, { name: 1, [1]: 1 })To select multiple fields, list each with a value of 1 in the projection document.
Fill both blanks to exclude 'password' and 'ssn' fields from the results.
db.users.find({}, { [1]: 0, [2]: 0 })To exclude multiple fields, list each with 0 in the projection document.
Fill all three blanks to select 'name' and 'email' fields but exclude '_id' field.
db.users.find({}, { [1]: 1, [2]: 1, [3]: 0 })To include fields, set them to 1; to exclude '_id', set it to 0.
