Deletes a key.
Last updated 2 years ago
db.get('food'); // ['pizza', 'burger', 'fries'] db.delete('food'); // true db.get('food'); // undefined
Also allows the use of dot notation:
db.get('student'); // { name: '5antos', number: 12345 } db.delete('student.number'); // true db.get('student'); // { name: '5antos' }
Parameter
Description
key
String
The key to delete
Returns
Boolean
Whether the key was successfully deleted or not