how to find specific key in object javascript code example Example: js object contain key if ('key' in myObj) // better if (!myObj.hasOwnProperty('key'))