I have a set of data inside a dictionary and inside
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
method I want to fetch data from this dictionary. How can we fetch objects for each indexPath.row.
One way, I could think of is getting keys array and then fetch the object from this array based on indexPath.row and then use this key to fetch the dictionary object.
Please suggest.
dictionary is not an ordered collection like array, so the method you’ve suggested is probably the way to go… Depends on how do you want the data to be presented (sorted by keys/values).