Um, JSON _is_ a string. It's not an object until the front end evaluates the string. jQuery can handle all of that for you though. Also, you used format=json. You need to use returnFormat.
On Tue, Jan 6, 2009 at 8:44 AM, Joe <[email protected]> wrote: > I just tried it and my CFC is still returning the JSON content but it seems > like it still appears to be a string rather than an object. I'm using this: > > //var wsURL = > '/ws/emp.cfc?method=getEmpInfo&returnFormat=json&searchParam=101'; > var wsURL = > 'http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any > &format=json&jsoncallback=?'; > $.getJSON(wsURL, > function(jsondata) { > // fnPopEmpList(jsondata); > alert(jsondata); > alert(jsondata.items[1].tags); > // $.each(jsondata.items, > function(i,item){ > // alert(item); > // }); > } > ); > > When I use Flickr, alert(jsondata) displays [object Object] and I can access > elements like array notes; when I use my CFC alert(jsondata) displays a > string and trying to access elements results in "undefined". > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317455 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

