Lucee Function Reference
Function STRUCTINSERT
Inserts a key-value pair into a structure.
Example
structinsert(struct structure,string key,any value,[boolean allowoverwrite]):boolean
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
structure | struct | Yes | Structure to contain the new key-value pair. |
key | string | Yes | Key that contains the inserted value. |
value | any | Yes | Value to add. |
allowoverwrite | boolean | No | Whether to allow overwriting a key. Default: False. |