How to take union of elements inside two different complex types?