How would I pick out certain part of NSMutableArray? One fielding array from server is 2012-09-01 09:00:00 America/Los_Angeles I am trying to get just the time. I was thinking turning it into a string and then getting it and then back into NSMutablearray to populate to tableview cells. I am still looking at documentation
Options I am thinking of: -subarrayWithRange: componentsSeparatedByString:
UPDATE: Here is what I am doing now to get the field of appointments
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
NSDictionary* myslots =[json objectForKey:@"slots"];
self.timesArray = [[NSMutableArray alloc] init];
NSLog(@"allslots: %@", myslots);
for (NSString *slotKey in myslots.allKeys) {
NSDictionary *slot = [myslots valueForKey:slotKey];
for (myDays in slot){
if ([[self.myDays objectForKey:@"isReservable"] isEqualToNumber:[NSNumber numberWithInt:1]])
[self.timesArray addObject:[self.myDays objectForKey:@"begin"]];
//NSLog(@"This is the times count: %@", timesArray.count);
}
}
NSLog(@"These are the times avail: %@", self.timesArray);
[self.tableView reloadData];
}
All I want eventually is an array of just the times. I am sorry if I am not being clear. I am trying to. Please let me know what information I can provide to paint a clearer picture