Expand my Community achievements bar.

explore an [object Object]


Level 1
I retrieve some event.data from a web service that i'm not
able to exploit.

A trace(event.data); gives me this : [object Object]. I can't
find a way to extract that, to know what is inside before casting
it to something, and i find nothing in the documentation API.
event.data.className is undefined.

This looks like a stupid general beginner question...


2 Replies


Level 1
You can use ObjectUtil.

import mx.utils.ObjectUtil;

Alert.show(ObjectUtil.toString(event.data), "Event Data");

This will alert out everything that's within event.data into
a single string. The format won't be pretty but it'll most likely
tell you everything you need to know that's inside of that