I'm using jQuery to make a direct CFC call, with the optional returnFormat
parameter.
Here's the get call:
--------------------
$.get("coupons.cfc?method=getSingleCoupon", {
couponid: couponid,
siteid: siteid,
returnFormat:'JSON'
},function(d){
// alert(d['DATA'][0][0]);
console.log(d);
$container.css({
'background-image': 'none'
});
});
Here's the result when I log to the console:
------------------
{
"COLUMNS":["ID","TITLE"],
"DATA":[
[4,"15% Off A Timing Belt Package"]
]
}
So it's an object with an array named COLUMNS, and one named DATA. I should be
able to reference the title like so:
d['DATA'][0][1];
But when I do so in Firefox, using Firebug I get the error:
d.DATA has no properties
coupons.js
Line 68
What am I doing wrong?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310995
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4