Removes all data from a structure.
structClear(structure)
→ returns boolean
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
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.