convert dictionary to array swift
let dic = ["1":"a", "2":"b", "3":"c"]
let arrayOfKeys = Array(dic.keys.map{ $0 })
print(arrayOfKeys) // [1, 2, 3]
let arrayOfValues = Array(dic.values.map{ $0 })
print(arrayOfValues) // [a, b, c]
Also in Swift:
- custom binding swiftui
- UI API called on a background thread
- loop through array swift
- swift loop through array
- swift double v float
- remove cocoapods swiftr
- sprite kitYourNextScene
- how to change the font of buttons programmatically swift
- how to use alamofire pod in swift 5
- textchange in textview swift
- store bool value in nsuserdefaults swift
- declare empty string in swift
- format decimal place swift
- how can i find range of a string in another string swift
- get local currency iap swift
- swift generate random number
- how to get index path cell collection view from ui longpress gesture swift
- Expression of type 'UIViewController?' is unused warning when pop view controller in swift 3.0
- swift uicollectionview cell size
- jar not declared js
- presentviewcontroller must be set swift google login
- swift set uiimage color
- screen recorder swift
- register page