how to check if a value is a key in an object javascript code example Example: typescript check if object has key if ('key' in myObj)