Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Get the FieldValue object
- var FieldValue = require('firebase-admin').firestore.FieldValue;
- // Create a document reference
- var cityRef = db.collection('cities').doc('BJ');</code>
- // Remove the 'capital' field from the document
- var removeCapital = cityRef.update({
- capital: FieldValue.delete()
- });
Add Comment
Please, Sign In to add comment