Skip to content

Instantly share code, notes, and snippets.

@aravindhkumar23
Created October 18, 2016 11:13
Show Gist options
  • Save aravindhkumar23/597a53a06bdbb23bd0b832840540c0b3 to your computer and use it in GitHub Desktop.
Save aravindhkumar23/597a53a06bdbb23bd0b832840540c0b3 to your computer and use it in GitHub Desktop.
Sorting Array of dictionary with key(Int) eg:[{"name":"value","time":"time"},{}]
sortedarray = storedarray.sort{
(($0 as! Dictionary<String, AnyObject>)["time"] as? Int) < (($1 as! Dictionary<String, AnyObject>)["time"] as? Int)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment