struct.update()

Updates a key with a value.

struct.update( key=string, value=any )

Returns: Struct

Argument Description
key
string, required

Key, the value of which to update

value
any, required

New value

Examples

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

See also