title: How to add dictionary to array
body: <p>Simple example:</p>
  
  <pre><code>Dim d, a(0)
  Set d = CreateObject("Scripting.Dictionary")
  d.Add "a", "Athens"
  d.Add "b", "Belgrade"
  d.Add "c", "Cairo"
  Set a(0) = d
  
  WScript.Echo(TypeName(a))
  </code></pre>
  
  <p>Output:</p>
  
  <p><code>Variant()</code></p>
  
  <p>I don't see any way how to access this object, it counts 3, but it seems like empty</p>
  
  <p>I find it surprising that Google does not list any useful result for this question - how to assign dictionary in array?</p>
  
  <p>Closest I found was this unanswered <a href="http://www.tek-tips.com/viewthread.cfm?qid=1397563" rel="nofollow">link</a></p>
  
  <p>My problem is that I have a loop that creates temporary dictionary, which I planned to feed in simple one dimensional array with dictionary objects, but without success</p>
  
  <p>I also found something like this <a href="http://wiki.mcneel.com/developer/scriptsamples/dictionary" rel="nofollow">link</a> where two arrays are created for dictionary keys and for dictionary items (values) separately, which just complicated things too much for my case</p>
  
  <p>So is this possible at all with VBScript?</p>