title: Objective-C: Convert id to NSInteger
body: <p>I have a dictionary with an NSNumber in it and I'd like to convert it into NSInteger. Is the simplest/shortest way to do this is to typecast into NSNumber and then calling integerValue? Like so:</p>
  
  <pre><code>// newQuestion is an NSDictionary defined somewhere
  NSInteger questionId = [(NSNumber *)[newQuestion objectForKey:@"question_id"] integerValue];
  </code></pre>
  
  <p>Is there a better way to do this? Thanks!</p>