StructKeyList()
Extracts keys from a struct.
StructKeyList( struct=struct, delimiter=string );
Returns: String
| Argument | Description | Default |
|---|---|---|
|
struct
struct,
required
|
edit
Structure from which to extract a list of keys. Alias: structure, object |
|
|
delimiter
string,
optional
|
edit
String that separates keys in list. Default: comma. Alias: delimiters |
, |
Usage Notes
editFor unsorted structs, Adobe returns a text sorted list of keys, for performance reasons, Lucee simply returns the raw sort order
Examples
editNon-Member Function
animals = {
cow: "moo",
pig: "oink",
cat: "meow",
bird: "chirp"
};
// StructKeyList(animals)
animalList = StructKeyList(animals);
echo(animalList);
See also
- Structures
- StructKeyArray()
- struct.keyList()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)