# struct.keyArray()

Returns an array of the keys from a structure; if structure does not exist, CFML throws an exception.

```
struct.keyArray( )
```

**Returns:** array

*This function does not take any arguments.*

# Examples

### Unordered Structs (default)

```1
animals = {
	cow: "moo",
	pig: "oink",
	cat: "meow",
	bird: "chirp"
};
dump(animals.keyArray());
```

### Ordered Structs

```1
animals = [
	cow: "moo",
	pig: "oink",
	cat: "meow",
	bird: "chirp"
];
dump(animals.keyArray());
```

# Categories

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

# See Also

[StructKeyArray()](../../functions/structkeyarray.md), [Struct](../struct.md)