You can use array notation for your structure keys here. So: <cfset LOCAL.retVal.page = 1>
Becomes: <cfset LOCAL.retVal['page'] = 1 > Using array notation in this only way AFAIK to force the case of your keys (CF will uppercase them otherwise). Dominic 2009/8/12 Rick Root <rick.r...@webworksllc.com> > > So I'm trying to use a grid component - either jqGrid of flexigrid. > Both seem very nice. > > But both expect the JSON data to be returned in a specific format.. > > Example... flexigrid is looking for an object containing "page" > "total" and "rows" where rows is an array. > > So my cfc does this: > > <cfset LOCAL.retVal = structNew()> > <cfset LOCAL.retVal.page = 1> > <cfset LOCAL.retVal.total = LOCAL.qry.recordCount > > <cfset LOCAL.retVal.rows = > application.udf.QueryToArrayOfStructures(LOCAL.qry)> > <cfcontent type="text/plain" reset="yes"> > <cfreturn LOCAL.retVal /> > > and the problem here is that coldfusion upper cases the structure > elements, so I end up with "PAGE" "TOTAL" and "ROWS" which of course > it doesn't like because JS is case sensitive. > > What do I do? > > > -- > Rick Root > New Brian Vander Ark Album, songs in the music player and cool behind > the scenes video at www.myspace.com/brianvanderark > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325416 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4