Cómo verificar si el objeto tiene la clave JavaScript
myObj.hasOwnProperty('key') // it checks object for particular key and not on prototype
Proud Pony
myObj.hasOwnProperty('key') // it checks object for particular key and not on prototype
Object.prototype.hasOwnProperty()
Object.prototype.hasOwnProperty.call(object, key)