Hello! I know that dict in Swift is not an ordered collection, but you need to make it so. Do not tell me how?

  • to throw in the array - Max Mikheyenko

1 answer 1

You can write your generic dictionary by making it ordered. For this, you need to create an array, where you'll save the keys. Turning on the index in the array, get the key and the key already get the value from the dictionary. There is a good article on this topic: https://habrahabr.ru/post/239207/