check in object if its value or key javascript code example Example: typescript check if object has key if ('key' in myObj)