This module will still work but I will no longer maintain it since lodash implements it.
delete-property
Deletes a deeply nested object property. Returns true if successfully deleted. Returns false if property doesn't exist or if the passed in argument is not an object.
Installing
npm install delete-property
Example usage
var deleteProperty = require('delete-property');
var obj = {
n: {
p: {
m: true
}
}
};
var deleteNPM = deleteProperty('n.p.m');
console.log(deleteNPM(obj));
console.log(obj.n.p.hasOwnProperty('m'));
var deleteSuckIt = deleteProperty('suck.it');
console.log(deleteSuckIt(obj))
console.log(deleteSuckIt(undefined))
console.log(deleteSuckIt(null))
console.log(deleteSuckIt(69))
console.log(deleteSuckIt('god damn it'))