how to chck if object already has key in js code example Example: typescript check if object has key if ('key' in myObj)