I am creating an app for as existing website. They currently has the JSON in the following format :
[
{
\"id\": \"value\",
\"array\": \"[{\
@property NSMutableURLRequest * urlReq;
@property NSURLSession * session;
@property NSURLSessionDataTask * dataTask;
@property NSURLSessionConfiguration * sessionConfig;
@property NSMutableDictionary * appData;
@property NSMutableArray * valueArray; @property NSMutableArray * keysArray;
-(void)getData
{
self.urlReq = [[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:self.linkString]];
self.sessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration];
self.session = [NSURLSession sessionWithConfiguration:self.sessionConfig];
self.dataTask = [self.session dataTaskWithRequest:self.urlReq completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
self.appData = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
NSLog(@"%@",self.appData);
self.valueArray=[self.appData allValues];
self.keysArray = [self.appData allKeys];
}];
[self.dataTask resume];