I need to sort the array values which are get from the dictionary . I need to sort it based on key or values .
i have tried the code
var Dictionary = [Int : String]()
Dictionary = [1: "pandi" , 2 : "nashrin" , 3 :"vanji"]
print(Dictionary)
var dicarray = [[Int :String]]()
dicarray = [Dictionary]
print(dicarray)
let dictKeyInc = dicarray.sorted(by: <)
print(dictKeyInc)
but i was not able to sort .