how to create nested list

hi,

i am using a!forEach to create a list of variants and wanted to return the iteration item as Array/List itself

for eg,

a!localVariables(
local!testVariable: { "A", "B", "C;D" },
local!valuesAsArray: a!forEach(
items: local!testVariable,
expression: if(
length(split(fv!item, ";")) > 1,
split(fv!item, ";"),
fv!item
),

),
local!valuesAsArray
)

Above expression is returning results as {"A", "B", "C", "D"}

Instead i wanted the results as {"A", "B", {"C", "D"}}.

Any suggestions on how to achieve this

  Discussion posts and replies are publicly visible