Returns the keys in a CFML structure as an array. If structure does not exist throws an exception.
structKeyArray(structure)
returns array
someStruct.keyArray()
Name | Type | Required | Default | Description |
---|---|---|---|---|
structure | struct | Yes |
statusCodes = {
OK = 200,
CREATED = 201,
NOT_MODIFIED = 304,
BAD_REQUEST = 400,
NOT_FOUND = 404
};
writeDump(structKeyArray(statusCodes));
CF11+ Lucee4.5+ Retrieve a comma separated list of keys using the member function
statusCodes = {
OK = 200,
CREATED = 201,
NOT_MODIFIED = 304,
BAD_REQUEST = 400,
NOT_FOUND = 404
};
writeDump(statusCodes.keyArray());