title: Can't convert dictionary to the array. Swift
body: <p>Well, I am totally confused. I am trying to get the array of keys from the dictionary. This is what I wrote:</p>
  
  <pre><code>if (customerViewModel.customer._dynamicMonthCount != nil) {
      var array = customerViewModel.customer._dynamicMonthCount
      var months_keys = Array(arrayLiteral: array!.keys) //that does not work
  }
  </code></pre>
  
  <p>Well, as you understood, "_dynamicMonthCount" is a dictionary:</p>
  
  <pre><code>var _dynamicMonthCount:Dictionary&lt;String,Int&gt;?
  </code></pre>
  
  <p>I give it the value as I get the data from server in json. (Actually, that dictionary is JSON Object as Dictionary).</p>
  
  <p>BUT, every time I debug the program, I see that array is [LazyMapCollection&lt;[String : Int], String>].</p>
  
  <p>I tried that with different array and it works :</p>
  
  <pre><code>let dictionary = var regions:Dictionary&lt;String,Int&gt; = [...]  //my static dictionary
  var values = Array(dictionary.values) //that works 
  var keys = Array(dictionary.keys) //that works
  </code></pre>
  
  <p>Does that mean that the only problem in optional type and dynamic data? I don't know, help me, guys, please</p>