Advertisement
Guest User

Untitled

a guest
Mar 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NSMutableDictionary *chapId = [[NSMutableDictionary alloc] init];
  2.                                  
  3.                                  if ([_theBook.chaptersArray count] == 1) {
  4.                                      NSMutableDictionary *chapId = [[NSMutableDictionary alloc] initWithDictionary:[_theBook.chaptersArray objectAtIndex:<#(NSUInteger)#>]];
  5.  
  6.                                      [chapId setValue:[_theBook.chaptersArray valueForKey:@"_v"] forKey:@"_v"];
  7.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"_id"] forKey:@"_id"];
  8.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"book"] forKey:@"book"];
  9.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"endDate"] forKey:@"endDate"];
  10.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"startDate"] forKey:@"startDate"];
  11.                                      [chapId setObject:[_theBook.chaptersArray valueForKey:@"pages"] forKey:@"pages"];
  12.  
  13.  
  14.                                  } else {
  15.                                      chapId = [_theBook.chaptersArray objectAtIndex:indexPath.row];
  16.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"_v"] forKey:@"_v"];
  17.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row]objectForKey:@"_id"] forKey:@"_id"];
  18.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"book"] forKey:@"book"];
  19.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"endDate"] forKey:@"endDate"];
  20.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"startDate"] forKey:@"startDate"];
  21.                                      [chapId setObject:[[_theBook.chaptersArray objectAtIndex:indexPath.row] objectForKey:@"pages"] forKey:@"pages"];
  22.                                  }
  23.  
  24.  
  25.  
  26.  
  27.  
  28. 2017-03-18 19:02:04.299 lookback[32756:6220430] {
  29.     "_id" =     (
  30.                 (
  31.             58cdbc50107dc36f64d6537b
  32.         )
  33.     );
  34.     "_v" =     (
  35.                 (
  36.             "<null>"
  37.         )
  38.     );
  39.     book =     (
  40.                 (
  41.             58cdbc50107dc36f64d6537a
  42.         )
  43.     );
  44.     endDate =     (
  45.                 (
  46.             "2018-01-17T05:00:00.000Z"
  47.         )
  48.     );
  49.     pages =     (
  50.                 (
  51.                         (
  52.             )
  53.         )
  54.     );
  55.     startDate =     (
  56.                 (
  57.             "2017-01-18T05:00:00.000Z"
  58.         )
  59.     );
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement