Lucee Function Reference

arraytostruct()

Transform the array to a struct, by default, the index of the array is the key of the struct

Example

arraytostruct(array array,[boolean valueAsKey]):struct

Category

array,struct

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
array array  Yes   array to translate  
valueAsKey boolean  No false use the value as the key of the struct, rather than the index