title: Sort Json based on multiple values
body: <p>In Java, I want to sort my JSON objects (not a JSON array) based on multiple values. Below is an example of input JSON file content.</p>
  
  <pre><code>{"Name":"John","Age":27,"Gender":"Male"}
  {"Name":"Lynda","Age":42,"Gender":"Female"}
  {"Name":"Peter","Age":34,"Gender":"Male"}
  {"Name":"Sheebha","Age":23,"Gender":"Female"}
  </code></pre>
  
  <p>I need to sort these objects by Age and Gender. I need an output like below.</p>
  
  <pre><code>{"Name":"John","Age":27,"Gender":"Male"}
  {"Name":"Peter","Age":34,"Gender":"Male"}
  {"Name":"Sheebha","Age":23,"Gender":"Female"}
  {"Name":"Lynda","Age":42,"Gender":"Female"}
  </code></pre>
  
  <p>I am using GSON to parse the JSON. I just want an approach to do it.  I am able to find solutions to sort a JSON array, but couldn't find one for objects. </p>
  
  <p>Also, let me know the best API to parse JSON; GSON or JSON.simple or anything else.</p>