title: Swift CoreData DictionaryResultType cast
body: <p>in the following code I use CoreData to get distinct results:</p>
  
  <pre><code>    request.propertiesToFetch = NSArray(objects: "docID", "docName")
      request.resultType = NSFetchRequestResultType.DictionaryResultType
      request.returnsDistinctResults = true
  
      var distinctResults: NSArray = context.executeFetchRequest(request, error: nil)
      println(distinctResults)
  </code></pre>
  
  <p>This is the output of println():</p>
  
  <blockquote>
    <p>(
            {
            docID = 3;
            docName = "Dr. Goy";
        },
            {
            docID = 1;
            docName = "Dr. Bar";
        },
            {
            docID = 0;
            docName = "Dr. Foo";
        },
            {
            docID = 2;
            docName = "Mr. Baz";
        }
    )</p>
  </blockquote>
  
  <p>It's an Array with Dictionaries - How I can cast this NSArray into a Dictionary with a for loop</p>
  
  <p>Thanks for help!</p>