Created
November 10, 2015 15:40
-
-
Save nirname/ce07afdea1143b61f0a2 to your computer and use it in GitHub Desktop.
Recursivly remove property by name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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