Complete the code to set data in Firestore with merge option.
db.collection('users').doc('user1').set({ name: 'Alice' }, { [1]: true });
The merge option allows you to update specific fields without overwriting the entire document.
Complete the code to merge new data into an existing Firestore document.
db.collection('settings').doc('config').set({ theme: 'dark' }, { [1]: true });
Using merge: true updates only the specified fields.
Fix the error in the Firestore set call to merge data correctly.
db.collection('profiles').doc('user2').set({ age: 30 }, { [1] });
The option must be an object with merge: true to merge fields.
Fill both blanks to set data with merge option and update the 'status' field.
db.collection('orders').doc('order1').set({ status: 'shipped' }, { [1]: [2] });
Use merge: true to update only the 'status' field without overwriting the whole document.
Fill all three blanks to set nested data with merge option in Firestore.
db.collection('users').doc('user3').set({ profile: { age: [1] } }, { [2]: [3] });
Set the age to 25 and use merge: true to update nested fields without overwriting the whole document.
