If you have the data downloaded, save it to the documents directory and check if no internet connection, then load the content from the documents directory.
Get Documentpath
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentPath = [paths objectAtIndex:0];
If you have an NSDictionary:
NSString *path = [NSString stringWithFormat:@"%@",[paths objectAtIndex:0]];
NSDictionary *dict = [[NSDictionary alloc] init];
[dict writeToFile:[path stringByAppendingPathComponent:@"myOfflineData"] atomically:NO];
And to get it:
NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:[path stringByAppendingPathComponent:@"myOfflineData"]];
Or save it with a NSString etc.
To catch up your Example:
NSData *jsonData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http:......."]];
id jsonObjects = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil]; jsonResults = [jsonObjects objectForKey:@"nodes"];
[jsonData writeToFile:[path stringByAppendingPathComponent:@"myOfflineData"] atomically:NO];
And if you are offline:
NSData *jsonData = [[NSData alloc] initWithContentsOfFile:[path stringByAppendingPathComponent:@"myOfflineData"]];