mardi 23 juin 2015

get key of a object at index x

How to get the key at specified index of a object in Flex?

var screenWindowListObject:Object = {
  'something' : 'awesome',
  'evenmore'  : 'crazy',
  'evenless'  : 'foolish'

I want key at index 1 i.e evenmore.

In JavaScript it can be possible by using the following code.

var keys = Object.keys(screenWindowListObject);
console.log(keys[1]);   // gives output 'evenmore'

Is there any equivalent in Flex?

Aucun commentaire:

Enregistrer un commentaire