You can try this:
NSMutableArray * ma = [NSMutableArray new];
for (int i = 0; i < 10; i++){
for (int d = 0; d < 10; d++){
[ma addObject:[NSString stringWithFormat:@"%i%i",i,d]];
}
}
NSLog(@"id is %@", ma);
Cycle through the I loop, then the D loop and add into the array as NSString objects. If you need them as NSNumbers, just convert them later. If you are counting up from 0 to n, you can use a single for loop (e.g. from 0 to 100 would work in the example above), while nesting for loops works better if you're using non numerical IDs.
If you want to keep the 0 character in front of IDs below ten, using a single for loop:
NSMutableArray * ma = [NSMutableArray new];
for (int i = 0; i < 100; i++){
[ma addObject:[NSString stringWithFormat:@"%02d",i]];
}
NSLog(@"id is %@", ma);
Using your method:
NSMutableArray * ma = [NSMutableArray new];
for (int i = 0; i < 10; i++){
for (int d = 0; d < 10; d++){
[ma addObject:@[@(i),@(d)]];
}
}
int thirtiethI = [ma[30][0] intValue];
int thirtiethD = [ma[30][1] intValue];
NSLog(@"thirtieth: %i %i", thirtiethI, thirtiethD);