myObj.hasOwnProperty('key') // You can use if ('key' in myObj) but it will // also match object's prototype