# struct.clear()

Removes all data from a structure.

```
struct.clear( )
```

**Returns:** struct

*This function does not take any arguments.*

# Examples

```cfml
	animals = {
		cow: "moo",
		pig: "oink"
	};
	// Show current animals
	Dump(
		label: "Current animals",
		var: animals
	);
	// Clear struct
	animals.clear();
	// Show animals, now empty
	Dump(
		label: "Animals after calling struct.clear()",
		var: animals
	);
```

# Categories

[Structures](../../../categories/struct.md)

# See Also

[StructClear()](../../functions/structclear.md), [Struct](../struct.md)