struct.duplicate()
Returns a new duplicated version of the given object, removing all references to the old one
struct.duplicate( deepCopy=boolean )
Returns: any
Argument | Description |
---|---|
deepCopy
boolean,
optional
|
if set to true (default) also the child elements are cloned, otherwise the child elements are still the same as in the original object |
Examples
animals = {1:"tiger",2:{5:'lion',6:'deer'},3:"wolf",4:"dog"};
writeDump(animals);
res = animals.duplicate();
writeDump(res);