Created
May 28, 2019 12:21
-
-
Save markreale/0d63b9025cfb73df039e3a6ea895fe46 to your computer and use it in GitHub Desktop.
Firestore - Creating a new entry (Document in a Collection) with a custom Document ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.collection("[YOUR_COLLECTION]").doc("[YOUR_DOCUMENT]").set({ | |
[YOUR_PROPERTY]: "[YOUR_UPDATED_VALUE]" | |
}) | |
.then(function() { | |
console.log("Document successfully written!"); | |
}) | |
.catch(function(error) { | |
console.error("Error writing document: ", error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment