CLARIFICATION: The question here is, "how do I stop using
<cfquery>
to retrieve data and replace it with a call to an API?"
I have a sql query where I need help to convert it to cfscript. However as you can see I have tried converting it. But, I need some verification if I am on the right path to convert from sql query to cfscript. if not, can anyone help me by converting from sql query to cfscript? thanks for the help. here is my code.
CFSCRIPT:
<cfset jsonDatas = fileRead("c:\Users\Desktop\MyApi.json" )>
<cfset jsonData = deserializeJSON(jsonDatas) />
<cfif arrayLen(jsonData)>
<cfloop array="#jsonData#" index="prop">
<cfoutput>
<cfscript>
// writedump(jsonData);for (item in jsonData[1]) {
if (#prop.payGrade# == 0) {
#prop.divisionNbr#;
#prop.probationBeginDate#;
#prop.legacyStatus#;
#prop.payStep#;
#prop.creationDate#;
}
Output:`, but I want to see if I am converting right from sql query to cfscript – jonathon myers May 22 '20 at 17:42