title: Sorting a Firebase NSMutableArray Numerically
body: <p>Im trying to sort through my Firebase Data by putting the User with the highest combat power at the top and the lowest at the bottom.  However, I've never used <code>NSSortDescriptor</code> before and it's not working.  This crashes and says: </p>
  
  <blockquote>
    <p>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM
    sortedArrayUsingDescriptors:]: unrecognized selector sent to instance
    0x174056e60'</p>
  </blockquote>
  
  <pre><code>-(void) getObjectCount
  {
      self.ref = [[FIRDatabase database] reference];
      posts = [ref child:@"posts"];
  
      [posts observeEventType:FIRDataEventTypeValue withBlock:^(FIRDataSnapshot *snapshot)
       {
           myCount = snapshot.childrenCount;
           for (snapshot in snapshot.children)
           {
              self.userPosts = snapshot.value;
  
               NSLog(@"BEFORE Sorting *** : %@",userPosts.description);
  
               NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:@"Combat Power" ascending:NO];
               NSArray *sorter = @[ sort ];
               NSArray *sortedArray = [userPosts sortedArrayUsingDescriptors:sorter];
  
               NSLog(@"After Sorting *** : %@",sortedArray.description);
           }
           [self.tableView reloadData];
       }];
  }
  </code></pre>