StructKeyArray()
Returns an array of the keys from a structure; if structure does not exist, CFML throws an exception.
StructKeyArray( struct=struct );
Returns: Array
Argument | Description |
---|---|
struct
struct,
required
|
Structure from which to extract a list of keys Alias: structure, object |
Examples
Unordered Structs (default)
animals = {
cow: "moo",
pig: "oink",
cat: "meow",
bird: "chirp"
};
dump(StructKeyArray(animals));
Ordered Structs
animals = [
cow: "moo",
pig: "oink",
cat: "meow",
bird: "chirp"
];
dump(StructKeyArray(animals));
See also
- Structures
- struct.keyArray()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)