I use method .keys
from the Dictionary
to fetch all keys that are in the dictionary and work with them like Array
.
Problem when i fetch it .keys
it returns LazyMapCollection
how i can convert it to Array
of keys.
Precondition:
User is structure with funds not nil dictionary [String:String]
.
let keys = user.funds?.keys
How should i convert keys to be Array
?