Lucee Function Reference
structinsert()
Inserts a key-value pair into a structure.
Example
structinsert(struct struct,string key,any value,[boolean allowoverwrite]):boolean
Category
struct,iterator
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
struct | 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. |