Hector Torres
unread,Sep 26, 2015, 1:48:01 AM9/26/15You 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
So I have a component for which I want it to return the value in JSON format:
<!--- Get all grades TEST --->
<cffunction name="testQuery" access="remote" returntype="query" returnformat="JSON" output="false">
<cfset var qTestRet="">
<cfquery datasource="#APPLICATION.dsn#" name="qTestRet" >
SELECT [gradeId]
,[description]
FROM [dbo].[grades]
</cfquery>
<cfreturn qTestRet>
</cffunction>
It is converting the value to JSON but for some reason it is adding a COLUMNS and DATA values to my JSON and therefore I can't parse it correctly. Am I missing anything or is this the way ColdFusion creates a JSON out of a query?
This is the output:
json_query={"COLUMNS":["GRADEID","DESCRIPTION"],"DATA":[["1","Demuestra dominio de la habilidad/concepto, con ayuda directa"],["2","Demuestra dominio de la habilidad/concepto, con el minimo de auda"],["3","Demuestra dominio de la habilidad/concepto"],["4","Entiende el concepto/habilidad arriba del nivel de las expectativas de su grado"],["N/A","Aun no evaluado"]]}