I have a FlattenArray function that returns any so that I can flatten any multidimensional arrays.
FlattenArray(Grid : [][]any) : []any =
var Result : []any = array{}
# Iterate through each row
for (Row : Grid):
# Add all elements from this row to the result
for (Value : Row):
set Result = Result + array{Value}
return Result
However, when I then try to cast these any to creative_prop type, I get “the Dynamic cast any to creative_prop
: argument type any
must be a class.” Searching the documentation I found nothing on how to cast from any type, is this possible? Or can I modify my Flatten array function to specify what type to return?