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