How to check if a JavaScript Object has a property name that starts with a specific string?
You can check it against the Object’s keys using Array.some which returns a bool. if(Object.keys(obj).some(function(k){ return ~k.indexOf(“addr”) })){ // it has addr property } You could also use Array.filter and check it’s length. But Array.some is more apt here.