Add and Manage Data
Delete Document Data
The following examples demonstrate how to delete documents, fields, and collections.
Delete Documents
Deleting a document is as simple as calling the delete
method on the document reference.
Initialize Database Modules
const worqhat = require('worqhat');
var config = new worqhat.Configuration({
apiKey: "your-api-key",
debug: true,
max_retries: 3,
});
worqhat.initializeApp(config);
let db = worqhat.database();
db.collection('NodeJSDb1').doc('NodeJSDoc1').delete().then((response) => {
console.log(response);
}).catch((error) => {
console.log(error);
});
Was this page helpful?