title: Sort a dictionary array when the key is given as the parameter
body: <p>I'm working in a project in swift3 and I have an NSArray named "details" that contains NSDictionary Objects. My requirement is to sort this NSArray If a "key" is passed as the parameter (eg:- name, lastName, age). My NSArray looks like bellow.</p>
  
  <pre><code>(
   {name:"John";
    lastName :"bow";
    age: "26"; 
   },
   {
    name:"paul";
    lastName :"law";
    age: "19";
    }
  
  )
  </code></pre>
  
  <p>how can I achieve this ??</p>