For the complete documentation index, see llms.txt. This page is also available as Markdown.

StructKeyList

Get keys of a struct as a string list

Method Signature

StructKeyList(structure=[structloose], delimiter=[string])

Arguments

Argument
Type
Required
Description
Default

structure

struct

true

The struct whose keys are returned.

delimiter

string

false

The delimiter to use between the keys in the returned list. Defaults to a comma.

,

Examples

Using Custom Delimiter

Retrieve a pipe separated list of keys

Run Example

statusCodes = { 
	OK : 200,
	CREATED : 201,
	NOT_MODIFIED : 304,
	BAD_REQUEST : 400,
	NOT_FOUND : 404
};
writeDump( structKeyList( statusCodes, " | " ) );

Result: "OK | CREATED | NOT_MODIFIED | BAD_REQUEST | NOT_FOUND"

Using Member Function

Retrieve a comma separated list of keys using the member function

Run Example

Result: "OK,CREATED,NOT_MODIFIED,BAD_REQUEST,NOT_FOUND"

Additional Examples

Run Example

Last updated

Was this helpful?