Okay, so I was following the example for the deserializedJSON function and it's giving me the "Element COLUMNS is undefined in CFDATA." error.
<cfhttp url="https://app.knowledgeowl.com/api/head/category.json" method="get" >
The following REReplace functions strip the function wrapper. --->
<cfset theData=REReplace(theData, "\s*\)\s*$", "")>
<!--- Test to make sure you have JSON data. --->
<h3>The URL you requested does not provide valid JSON</h3>
<cfdump var="#theData#" >
<!--- If the data is in JSON format, deserialize it. --->
<!--- Parse the resulting array or structure and display the data.
In this case, the data represents a ColdFusion query that has been
serialized by the SerializeJSON function into a JSON structure with
two arrays: an array column names, and an array of arrays,
where the outer array rows correspond to the query rows, and the
inner array entries correspond to the column fields in the row. --->
<!--- First, find the positions of the columns in the data array. --->
<cfset idIdx=ListFind(colList, "id")>
<cfset statusIdx=ListFind(colList, "status")>
<!--- Now iterate through the DATA array and display the data. --->
<cfloop index="i" from="1" to="#Arraylen(cfData.DATA)#">
Okay, so I tried this the following API from OpenWeatherMap and it gave the Error in custom script module error.
<cfhttp url="http://api.openweathermap.org/data/2.5/weather?zip=55101,us&appid=44db6a862fba0b067b1930da 0d769e98" method="get" >
Okay, I'm getting this Element COLUMNS is undefined in CFDATA. error again. Why am I kept getting the COLUMNS error?
Okay, my problem is the the cfData. I tried to output the length and it gave me this Error in custom script module error.
It's not working. This is what is working..got it from StackOverflow. I assumed the deserializeJSON automatically turned into query but it was not. Looks like it's a struct.
<cfif structKeyExists(cfData, 'weather') AND isArray(cfData.weather)>
<cfloop index="i" from="1" to="#arrayLen(cfData.weather)#">