I have an array of Person\'s objects:
Person
class Person { let name:String let position:Int }
and the array is:
Maybe something like this?
myArray.forEach({ myDictionary[$0.position] = $0.name })