Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSMutableDictionary *chapId = [[NSMutableDictionary alloc] init];
- if ([_theBook.chaptersArray count] == 1) {
- NSMutableDictionary *chapId = [[NSMutableDictionary alloc] initWithDictionary:[_theBook.chaptersArray objectAtIndex:<#(NSUInteger)#>]];
- [chapId setValue:[_theBook.chaptersArray valueForKey:@"_v"] forKey:@"_v"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"_id"] forKey:@"_id"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"book"] forKey:@"book"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"endDate"] forKey:@"endDate"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"startDate"] forKey:@"startDate"];
- [chapId setObject:[_theBook.chaptersArray valueForKey:@"pages"] forKey:@"pages"];
- } else {
- chapId = [_theBook.chaptersArray objectAtIndex:indexPath.row];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"_v"] forKey:@"_v"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row]objectForKey:@"_id"] forKey:@"_id"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"book"] forKey:@"book"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"endDate"] forKey:@"endDate"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"startDate"] forKey:@"startDate"];
- [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"pages"] forKey:@"pages"];
- }
- 2017-03-18 19:02:04.299 lookback[32756:6220430] {
- "_id" = (
- (
- 58cdbc50107dc36f64d6537b
- )
- );
- "_v" = (
- (
- "<null>"
- )
- );
- book = (
- (
- 58cdbc50107dc36f64d6537a
- )
- );
- endDate = (
- (
- "2018-01-17T05:00:00.000Z"
- )
- );
- pages = (
- (
- (
- )
- )
- );
- startDate = (
- (
- "2017-01-18T05:00:00.000Z"
- )
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement