Hi everyone,
I was wondering how i can trace the value of an object.
The object is actually a server JSON response that looks something like this:
var obj:Object = {"called":"getTest","response":{"ok":{"tracks":[{"name":"Name 1","id":"1"},{"name":"Name 2","id":"2"}],"artist":"SomeArtist","date":"21-08-2007",}}}
now I can trace (obj.response.ok.artist); //Outputs: SomeArtists
etc…
but how can i trace the whole reponse/obj?
so i can get
{“called”:“getTest”,“response”:{“ok”:{"…etcc
mind you
trace(obj.toString()); //outputs [object object]
thanks
SOLUTION:
Sorry my mistake, It was because i was tracing after the JSON is been decoded.
I just traced it before decoding and it output JSON as received from the server.