Is there a simpler way than using ___ in object to check the existence of each level of an object to check the existence of a single member?
___ in object
More conci
Something like (warning: untested code ahead)
var testProperty = function(obj, proplist) { for (var i=0; i < proplist.length; i++) { if (obj.hasOwnProperty(proplist[i])) { obj = obj[proplist[i]]; } else { return false; } } return true; }