title: Sort array of NSDictionaries by a value inside one of the keys
body: <p>I'm pulling an <strong>XML</strong> feed from a server, the feed contains train stations and their latitude and longitude locations.</p>
  
  <p>I've managed to create an <code>NSArray</code> full of <code>NSDictionary</code> objects, each corresponding to a station.</p>
  
  <p>In the dictionary there is a key for <strong>latitude</strong> and key for <strong>longitude</strong>. I also have a <code>CLLocation</code> object with the location of the device.</p>
  
  <p>I know how to calculate the distance between the device and each station, but the distance isn't part of the dictionary. I would like to sort the array in order of distance from the device.</p>
  
  <p>How would I do that? No idea where to start on this and Google or my books aren't being very helpful to me! Any help is much appreciated.</p>