Alexis
unread,Jul 21, 2009, 9:45:29 AM7/21/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ActionScript 3 Core Library
I'm using this library for the first time. The raw data I'm getting
back from PHP looks fine, but when I decode it, I seem to get a bunch
of empty objects.
Here is an excerpt of some of the JSON that is returned when I call
trace(urlLoader.data);
{"facets" : {"des_facet" : [{"count" : 1427 , "term" : "BOOKS AND
LITERATURE"} , {"count" : 1228 , "term" : "UNITED STATES POLITICS AND
GOVERNMENT"} , {"count" : 1199 , "term" : "SUBPRIME MORTGAGE
CRISIS"}]
Then I try to parse the JSON using:
var feed:Object = (JSON.decode(urlLoader.data));
Then when I do:
trace(feed.facets);
I get an object returned
BUT if I try to get something from that facets array using:
trace(feed.facets[0]);
I get "undefined".
Any help?