Find the object containing the key in the union type by the key. It takes two parameters: a union of object types and a key name.