iOS fetching data from server inside for loop
<p>I want to fetch data from server with multiple calls inside for loop. I'm passing different parameter each time. I know it is possible to fetch data like, I'm fetching in code below :</p>

<pre><code>for (NSDictionary *feedItem in [feed objectForKey:@"content"]) {
    // url with feedItem data.
    NSURL *url = ....
    [UrlMethod GetURL:url success:^(NSDictionary *placeData) {
        if (placeData) {
            dispatch_async(dispatch_get_main_queue(), ^{
                // adding object to table data source array
                [dataSourceArray addObject:[placeData objectForKey:@"data"]];
                // reloading table view.
                [self.tableView reloadData];

                });
            }
       } failure:^(NSError *error) {

       }];
}
</code></pre>

<p>The problem is, Whenever I add data to dataSourceArry, It is not adding sequentially. It is adding according to response of API calls. Please let me know, If it is not clear.</p>