Here's my code:
<cfif StructKeyExists(cfData.data[i], "inherited_roles") || IsArray(cfData.data[i].reader_roles)> <cfset arrayRoles = "reader_roles" > <cfif ArrayIsEmpty(cfData.data[i].inherited_roles)> <cfset arrayRoles = "inherited_roles" > </cfif> <cfloop index="p" from="1" to="#arrayLen(cfData.data[i].arrayRoles)#"> <!---some code here---> </cfloop></cfif>
And here's the error I kept getting.
Element ARRAYROLES is undefined in a CFML structure referenced as part of an expression.
The error occurred on line 07 when I have the #arrayLen(cfData.data[i].arrayRoles)#.
Any suggestion is much appreciated