Complete the code to embed the address inside the user document.
db.users.insertOne({ name: "Alice", address: [1] })The address should be embedded as a subdocument (an object) inside the user document for one-to-one embedding.
Complete the query to find users living in 'Springfield'.
db.users.find({ "address.[1]": "Springfield" })To query embedded documents, use dot notation. Here, 'address.city' matches the city field inside the embedded address.
Fix the error in the update to change the street in the embedded address.
db.users.updateOne({ name: "Bob" }, { $set: { "address.[1]": "456 Elm St" } })To update the street inside the embedded address, use the field 'address.street' with dot notation.
Fill both blanks to create a user document with embedded contact info.
db.users.insertOne({ name: "Carol", contact: { phone: [1], email: [2] } })Phone and email should be strings inside the embedded contact document.
Fill all three blanks to query users with a specific phone number in embedded contact.
db.users.find({ "contact.[1]": [2], name: [3] })Use dot notation to query the phone inside contact. Match the phone number and the user's name as strings.