Open in new window
<cfset Act = getAreaDetails()>
<cfset actID = iif(act.recordcount eq 0, 0, act.status.ReasonID)>
[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
<!--- Get the JSON Feed --->
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>
<!--- 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 cityIdx=ListFind(colList, "City")>
<cfset tempIdx=ListFind(colList, "Temp")>
<cfset fcstIdx=ListFind(colList, "Forecasts")>
<!--- Now iterate through the DATA array and display the data. --->
<cfloop index="i" from="1" to="#ArrayLen(cfData.DATA)#">
Current Temperature: #cfData.DATA[i][tempIdx]#<br><br>
<cfloop index="j" from="1" to="#ArrayLen(cfData.DATA[i][fcstIdx])#">
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.