Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

explore an [object Object]

Avatar

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...



Regads,

Phil
2 Replies

Avatar

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
object.