I'm working in a UITableView that is filled by data from a JSON format (link: http://data.okfn.org/data/core/country-codes/r/country-codes.json).
So, I want to divide the data from the UITableView in -alphabetical- sections, but idk how to do that.
These are the arrays I'm using for the app:
let sections:[String] = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
var mainList:[[String:String]] = []
I know that if your data were created by the developer from the app, you can use: sectionIndexTitlesForTableView, sectionForSectionIndexTitle & titleForHeaderInSection... but in this case that you can't control/create the data, how it works?
Thanks.