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