Single List of Variant which contains a dictionary array. How to index/access the list of dictionary?

Hi guys, this is a daft question but I can't for the life of me figure this out. I have an API response which I've indexed to retrieve the required data. If I output this indexed data, it's showing as the following format:

List of Variant (1 item)

List of Dictionary (3 items)

Dictionary

id 1 (Integer)

name "Alice" (Text)

Dictionary

id 2 (Integer)

name "Gail" (Text)

Dictionary

id 3 (Integer)

name "Kelly" (Text)

I'm trying to cast the above into a list of CDT, like so:

a!forEach(
    local!apiResponse,
    'type!{urn:com:appian:types:test}Customer'(
      customerName: fv!item.name
    )
  )

If I do that, instead of 3 Customer CDT's with a name in each, i.e.:

List of Customer - 3 items

    • Customer
        • customerName"Alice"(Text)
      • Customer
          • customerName"Gail"(Text)
          • Customer
              • customerName"Kelly"(Text)

            I'm getting one Customer CDT with all 3 names as a list in the one customerName field i.e:

            List of Customer - 1 item

              • Customer
                  • customerName"Alice; Gail; Kelly"(Text)

                I guess it's because I'm trying to perform the a!forEach on the single List of Variant, but how do I index into it to perform the forEach on the list of dictionaries within instead?

                Thanks for any help!

                  Discussion posts and replies are publicly visible