Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //I did a cfdump, and the keys all dump properly, so I tried to loop setting LOCAl.variable
- <cfloop collection="#jsonData#" item="key">
- <cfdump var="#key#">
- </cfloop>
- //I tried to loop the json data, and create local variables these different ways:
- <cfloop collection="#jsonData#" item="key">
- <cfset LOCAL.#key# = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset LOCAL[key] = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset LOCAL.[key] = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset LOCAL[#key#] = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset "LOCAL." & #key# = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset VARIABLES["LOCAL.#key#"] = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset VARIABLES[LOCAL."#key#"] = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset VARIABLES["LOCAL."#key#] = 'foo'>
- </cfloop>
- <cfloop collection="#jsonData#" item="key">
- <cfset "LOCAL." & #key# = 'foo'>
- </cfloop>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement