Skip to content

Instantly share code, notes, and snippets.

@nirname
Created November 10, 2015 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nirname/ce07afdea1143b61f0a2 to your computer and use it in GitHub Desktop.
Save nirname/ce07afdea1143b61f0a2 to your computer and use it in GitHub Desktop.
Recursivly remove property by name
function superkiller(o, prop_name) {
if(o.hasOwnProperty(prop_name)) {
delete o[prop_name]
}
$.each(x, function(i, e) {
if(typeof(e) == "object") { superkiller(e, prop_name) }
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment