I'd like to check the existence of a nested js object property, any way to simplify this code in one line?
if(json_root.hasOwnProperty(p1)){
if(json_root.p1.hasOwnProperty(p2)){
if(json_root.p1.p2.hasOwnProperty(p3)){
/**Do your things with json_root.p1.p2.p3*/
}
}
}