Updates a key with a value.
structUpdate(structure, key, value)
returns boolean
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| structure | struct | Yes | Structure to update | |
| key | string | Yes | Key, the value of which to update | |
| value | any | Yes | New value |
Change value of structure item
myStruct = {a: 1, b: 2, c: 3, d: 4};
structUpdate(myStruct,'c',15);
writeDump(serializeJSON(myStruct));