Then as you loop through your query, your build and populate a structure:
Then add the structure to the array. It should look like this:
"
Finally return the array back to the calling program:
This is done within a CFC defined as such:
cffunction name="getDepartmentsForExtTree" access="remote" returnformat="JSON">That in a nutshell is how to provide data for an ExtJS tree.