StructDelete()
Removes an element from a structure.
StructDelete( struct=struct, key=string, indicateNotExisting=boolean );
Returns: Boolean
Examples
Non-Member Function
animals = {
cow: "moo",
pig: "oink",
cat: "meow"
};
// Show current animals
Dump(
label: "Current animals",
var: animals
);
// Delete the key 'cat' from struct
StructDelete(animals, "cat");
// Show animals, cat has been deleted
Dump(
label: "Animals with cat deleted",
var: animals
);
See also
- Structures
- struct.delete()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)