get the object key if value 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