delete()

You can delete a data from database using with delete()

Syntax

db.delete(path,callback?)
  • Path; Path is a string, split with dot and required.

  • Callback; Callback is a function and not required.

Example

db.delete("user.john.bag",(callback) => {
console.log("Bag removed from john")
console.log(callback)
{
    name:"John",
    surname:"Doe",
    age:18
}
})

Last updated