array.toStruct()
Transform the array to a struct, the index of the array is the key of the struct
array.toStruct( valueAsKey=boolean )
Returns: Struct
Argument | Description |
---|---|
valueAsKey
boolean,
optional
|
use the value as the key of the struct, rather than the index |
Examples
myarray = ["one","two","three","four","five"];
res = myarray.tostruct();
writeDump(res);