StructValueArray

Returns an array of all values of top level keys in a struct

Method Signature

StructValueArray(struct=[structloose])

Arguments

Argument
Type
Required
Description
Default

struct

struct

true

The target struct from which to retrieve values

Examples

Traditional function

Run Example

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

Result: [200, 201, 304, 400, 404]

Additional Examples

Run Example

animals = { 
	COW : "moo",
	PIG : "oink",
	CAT : "meow",
	BIRD : "chirp"
};
writedump( structValueArray( animals ) );

Last updated

Was this helpful?