Skip to main content
Version: 1.0.0

objectKeys

objectKeys* ( object : object ) : collection

ParameterTypeDescription
objectobjectObject to return property names
ResultcollectionCollection of property names (strings)

Description

The objectKeys command returns areturns a collection of strings containing all of the enumerable property names of the object.

Only first-level property names are returned (property names of sub-objects are not returned). The order of names within the returned collection follows the definition order of the properties.

Example

var person : object
var col : collection

person = newObject
person.lastName = "Smith"
person.firstName = "Jenny"
person.children = newObject("Mary",12,"Mark",8)

col = objectKeys(person)

//col[0]:"lastName"
//col[1]:"firstName"
//col[2]:"children"

See also

objectEntries
objectValues