title: Output userid when structure stored in an array
body: <p>I have the following array with a structure within each array (see this <a href="http://jsfiddle.net/Excalibur/HgGf3/" rel="nofollow">jsfiddle</a> for what the array looks like).  </p>
  
  <p>How do I loop over the array, then get the structure within the array to pull out the userid?  I keep getting errors with variations that I've tried.  The most common error I'm getting is:</p>
  
  <pre><code>Must be a valid structure or COM object
  </code></pre>
  
  <p>Here is the code I have to loop over the array and structure that is generating the error above (see this <a href="http://jsfiddle.net/Excalibur/HgGf3/" rel="nofollow">jsfiddle</a> for what the array looks like).</p>
  
  <pre><code>&lt;cfloop from="1" to="#ArrayLen(getTeamDetails)#" index="s"&gt;
      #s#) #getTeamDetails[s][uid]#&lt;br&gt;   
  &lt;/cfloop&gt; 
  </code></pre>
  
  <p>Mark asked for some more code so I've included how I'm populating the array/structure:</p>
  
  <pre><code>&lt;cfoutput query="getTeam"&gt;
      &lt;cfset getTeamDetails[getTeam.currentrow] = StructNew()&gt;
      &lt;cfset a = StructInsert(getTeamDetails[getTeam.currentrow], "firstname", getTeam.firstname, 1)&gt;
      &lt;cfset a = StructInsert(getTeamDetails[getTeam.currentrow], "lastname", getTeam.lastname, 1)&gt;
      &lt;cfset a = StructInsert(getTeamDetails[getTeam.currentrow], "uid", getTeam.uid, 1)&gt;
  &lt;/cfoutput&gt;
  </code></pre>