c4086478
c4086478

Reputation: 23

actionscript 3 - how to get all properties from my Object?

How to get all properties from my Object ?

My object is:

var myObj: Object = {
    stringOne: "One",
    stringTwo: "Two",
    intOne: 1,
    intTwo: 2
}

Upvotes: 1

Views: 367

Answers (1)

GabrielAtan
GabrielAtan

Reputation: 410

Try with this:

for(var key:* in myObj) {
    trace (key + ':' + myObj[key]);
}

Upvotes: 3

Related Questions