-1

I retrieve an array from Imgur API but I don't know what it contains, how can I see the composition of the Array since the API did not specify the compositions.

    [IMGGalleryRequest hotGalleryPage:0 success:^(NSArray *objects) {

    self.wallObjectsArray = nil;
    self.wallObjectsArray = [[NSArray alloc] initWithArray:objects];

    [self loadWallViews];

} failure:^(NSError *error) {

    //Remove the activity indicator
    [self.activityIndicator stopAnimating];
    [self.activityIndicator removeFromSuperview];

    //Show the error
    NSString *errorString = [[error userInfo] objectForKey:@"error"];
    [self showErrorView:errorString];
}];
    }
  • It contains the stuff that's inside it. To find out, look (or consult the documentation for the API you're using). – Hot Licks Sep 21 '14 at 13:11

1 Answers1

0

If you just want to know what KIND of objects it contains, how about:

for(id anObject in wallObjectsArray) {
    NSLog(@"Object has class %@ and description %@", [anObject class], anObject);
}

That doesn't help if you also need more semantics, but it's a start.

RobP
  • 9,144
  • 3
  • 20
  • 33