Re: Accessing data returned from json call

2015-03-06 Thread Rob Parkhill
Well, I actually had to look at the result set from the CFC, to know which columns in the result.DATA array were the right ones. There's also a result.COLUMNS that gives you the list of column names, so for me result.DATA[0][2] was the name and the Acres field was in result.DATA[0][12] - hence wh

Re: Accessing data returned from json call

2015-03-06 Thread Torrent Girl
Thanks Rob I recreated your example with the cfartgallery data source in CF. Here is my method: select * from artists Here is my call: $.ajax({ type: 'get', url: 'data.cfc', data:

Re: Accessing data returned from json call

2015-03-06 Thread Rob Parkhill
Well, I don't know what standardiseCfQueryJSON does, but here's what I do: Select * from `field` where g_id = order by fieldname and then on the calling page: $.ajax({ type: 'get', url: '/cfcs/field/fields.cfc',

Re: Accessing data returned from json call

2015-03-06 Thread Akos Fortagh
Hi, your CFC should just simply return the array and there's no need for #serializeJSON(data)#, so assume you're populating the array correctly just do Then modify your ajax statement to something like the following: $.ajax({ type: "get", url:"data.cfc?returnformat=json, dat

Accessing data returned from json call

2015-03-06 Thread Torrent Girl
Hello I have the following json call: $.ajax({ url:"data.cfc?method=getData" ,dataType:"json" ,success: function( cfdata ){ data= $.standardiseCfQueryJSON( cfdata ); // do something with the data return data; } });