title: NSDictionary split into two arrays (objects and keys) and then sorted both by the objects array (or a similar solution)
body: <p>I have an NSDictionary. It has keys and objects.</p>
  
  <p>For the purposes of simplicity the keys are Question numbers and the objects are calculated Answer scores.</p>
  
  <p>Now how I did it before was that I set the answer score as the keys and the question numbers as the objects. This way I could get an array of allKeys from the dictionary, sort it and then do something similar to:</p>
  
  <pre><code>for(NSString *string in tempArray){
    NSLog(@"%@",[dictionary objectForKey:string]);
  }
  </code></pre>
  
  <p>The (stupid - on my part) problem that I have now encountered however is that (obviously... duuhhh) the keys need to unique, and therefore when the calculated answer scores are the same, only one answer gets output!</p>
  
  <p>I need a solution to this. In PHP you can <code>multisort</code> arrays. I was wondering if there was some similar solution in objective-c or indeed if someone had a better answer?</p>
  
  <p>Any help here would be much appreciated.</p>
  
  <p>Thank you.</p>