title: Looping through Collection of Dictionaries
body: <p>I have created a collection of dictionaries and have NO idea how to loop through them all.</p>
  <p>The collection consists of the various types of animals that a farm may have:</p>
  <ul>
  <li>Cows</li>
  <li>Dogs</li>
  <li>Swans</li>
  </ul>
  <p>Each of these are dictionaries containing more details on the types of animals within that group:</p>
  <ul>
  <li>Cows (Spotted, White, White, Black)</li>
  <li>Dogs (Big, Middle, Middle, Small)</li>
  <li>Swans (Cream, Dark)</li>
  </ul>
  <p>I am trying to have an overview of my dataset - to see which 'unique' types of Cows, Dogs and Swans I have.</p>
  <p>To do this, I was thinking of first looping through the collection of animals, and then go into each dictionary to screen through the list and extract the unique values.</p>
  <p>Easier said than done :P</p>
  <p>Here's what I have so far... and it's getting me nowhere:</p>
  <pre><code>Dim Cows, Dogs, Swans as Object
  
  Set Cows = CreateObject(&quot;scripting.dictionary&quot;)
  Set Dogs = CreateObject(&quot;scripting.dictionary&quot;)
  Set Swans = CreateObject(&quot;scripting.dictionary&quot;)
  </code></pre>
  <p>[...Add all the farm data into the 3 categories above...]</p>
  <pre><code>Dim TotalAnimals As New Collection, AnimalType
      TotalAnimals.Add Cows
      TotalAnimals.Add Dogs
      TotalAnimals.Add Swans
  
      For Each AnimalType In TotalAnimals
         
          For Each Animal In AnimalType &lt;&lt;&lt; HERE lies my error
          
          [Code for selecting unique values, works perfectly]
  
          Next Animal
  
      Next Animaltype
  </code></pre>
  <p>Any ideas on how to solve this (fairly simple) question?</p>