structClear

Removes all data from a structure.

structClear(structure) → returns boolean

structClear Argument Reference

structure struct
Required

Structure to clear

Examples sample code invoking the structClear function

profile = {name:'John', instrument:'guitar', occupation:'singer'};
structClear(profile);
writeOutput(serializeJSON(profile));

Expected Result: An empty struct

<cfset profile = {name:'John', instrument:'guitar', occupation:'singer'} />
<cfset structClear(profile) />
<cfdump var="#profile#" />

Expected Result: An empty struct


Fork me on GitHub