struct.update()

Updates a key with a value.

struct.update( key, value )

Returns: Boolean

Argument Description
key
string, required

Key, the value of which to update

value
any, required

New value

Examples

luceescript+trycf world = { save:"water", plant:"trees", clean:"waste" }; writedump(world); updateStruct = structupdate(world,"clean","room"); writeDump(updatestruct);

See also