Duplicate()
Returns a new duplicated version of the given object, removing all references to the old one
Duplicate( object=any, deepCopy=boolean );
Returns: any
Examples
person = { first = "Babe", last = "Ruth"};
dump(person); // Babe Ruth
clone = duplicate(person);
dump(clone); // Babe Ruth
person.last = "Smith";
dump(person); // Babe Smith
dump(clone); // Babe Ruth
See also
- struct.duplicate()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)