Use the Type field to determine which variant is active, then access the corresponding field:
switch inputsUnion.Type { case components.InputsUnionTypeStr: // inputsUnion.Str is populated case components.InputsUnionTypeArrayOfInputsUnion1: // inputsUnion.ArrayOfInputsUnion1 is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.