look for key in object javascript code example
Example: how to check if object has key javascript
myObj.hasOwnProperty('key') // it checks object for particular key and not on prototype
myObj.hasOwnProperty('key') // it checks object for particular key and not on prototype