title: Sorting array of dictionaries starting from a specific value
body: <p>I have an array of objects (dictionaries) which contain a key <code>@"Category"</code>. I have to sort it by a specific key starting by that key. For example if the values in the <code>objects[@"Category"]: A, B ,C ,D ,E ,F ,G , H etc.</code> and the user selects "sort by C" I need to reorder the root array by the object which <code>[@"Category"]</code> to: C,D,E,F,G,H,A,B -or- C,A,B,D,E,F,G,H .</p>
  
  <p>I hope it is clear what my goal is. I tried:</p>
  
  <pre><code>//    sortedPosts2 = [self.objects sortedArrayUsingComparator:^(PFObject *object1, PFObject *object2)  {
  //            return [object1[@"Category"] compare:object2[@"Category"] options:NSOrderedAscending];
  //    }];
  
  
  //    NSSortDescriptor *sort = [NSSortDescriptor sortDescriptorWithKey:category ascending:YES];
  //    sortedPosts2 = [self.objects sortedArrayUsingDescriptors:[NSArray arrayWithObject:sort]];
  
  
      [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationTop];
  }
  </code></pre>