KeysOfArray

Typeoperator
DictionaryLCB
LibraryLiveCode Builder
Syntax
the keys of <Target>
Associationscom.livecode.array
Summary

Returns the keys of an array.

Parameters
NameTypeDescription
Target

An expression which evaluates to an array.

Example
variable tArray as Array
put the empty array into tArray
put "value1" into tArray["key1"]
put "value2" into tArray["key2"]
put "value3" into tArray["key3"]

variable tKeys as List
put the keys of tArray into tKeys
sort tKeys in ascending order

variable tKeysString as String
combine tKeys with "," into tKeysString 
// tKeysString is "key1,key2,key3"
Values
NameTypeDescription
return

A list whose elements are the keys of Target.

RelatedLibrary: com.livecode.sort
Description

Note: The resulting list is not necessarily ordered in any way. Use the com.livecode.sort library to sort the keys.

Tagsarrays