Last updated 20 days ago
Was this helpful?
Clear all items from struct
Result: An empty struct
<bx:set profile = { NAME : "John", INSTRUMENT : "guitar", OCCUPATION : "singer" } > <bx:set structClear( profile ) > <bx:dump var="#profile#"/>
animals = { COW : "moo", PIG : "oink" }; // Show current animals Dump( label="Current animals", var=animals ); // Clear struct structClear( animals ); // Show animals, now empty Dump( label="Animals after calling StructClear()", var=animals );
StructClear(structure=[modifiableStruct])
structure
modifiableStruct
true
The struct to clear.
profile = { NAME : "John", INSTRUMENT : "guitar", OCCUPATION : "singer" }; structClear( profile ); writeOutput( JSONSerialize( profile ) );