最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

coldfusion - Convert nested structures and arrays in coldsfusion - Stack Overflow

programmeradmin1浏览0评论

I am not proficient at using structures and arrays but got something to work. Any tips for improving this?screen grab of nested structure

<cfset data = DeserializeJSON(_JSNresponse)
<cfloop array="#data.value#" index="x">
<cfloop array="#StructKeyArray(x)#" index="i">
<cfif i EQ "Media">
<cfset xi=evaluate("x.#i#")>
<!---#isarray(xi)# #isstruct(xi)#---><!---<cfdump var="#xi#">--->
<cfloop array="#xi#" index="iii">
<!---isarray=#isarray(iii)# isstruct=#isstruct(iii)#--->
<cfset mlsphotos=mlsphotos & StructFind(iii,'MediaURL') & ",">
</cfloop>
<!---#mlsphotos#--->
</cfif>
<!---<cfoutput>#xi#</cfoutput><!---<cfdump var="#i#">---><!---gives list of fields-->
</cfloop>
</cfloop>
发布评论

评论列表(0)

  1. 暂无评论