Merging Arrays
I have 4 Arrays of Objects/Structures in my function that I need to merge into one Array so I can return it to my Flex app. I googled it and found a bunch of articles that talk about using the Java function addAll(), but when I tried, it returned an errors saying the function was not found. I saw other articles that talked about the old way of looping over with the Array attribute and passing in the index, but I keep getting a weird Java Boolean as an Array error. Can anyone help me figure this out?
Here is what I have:
<cfset allPets = ArrayNew(1) />
<cfloop array="#adoptables#" index="i">
<cfset allPets = ArrayAppend(allPets, #i#)>
</cfloop>
<cfloop array="#pending#" index="i">
<cfset allPets = ArrayAppend(allPets, #i#)>
</cfloop>
<cfloop array="#adopted#" index="i">
<cfset allPets = ArrayAppend(allPets, #i#)>
</cfloop>
<cfloop array="#hold#" index="i">
<cfset allPets = ArrayAppend(allPets, #i#)>
</cfloop>
It is an Array of Structures if that helps. Thanks!
