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)

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

Ordered Structs

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

See also