title: Grouping Json response with keys in java - android studio
body: <p>I am new to java and android development. I am learning json parsing. I got json response something like this.</p>
  
  <pre><code>{"code":"0","data":    
  [ {"chrDesigName":"Developer","chrempName":"Test Employee1"},
    {"chrDesigName":"Developer","chrempName":"Test Employee2"}, 
    {"chrDesigName":"Tester","chrempName":"Test Employee3"},
    {"chrDesigName":"Analyst","chrempName":"Test Employee4"},
    {"chrDesigName":"Developer","chrempName":"Test Employee5"},
    {"chrDesigName":"Tester","chrempName":"Test Employee6"}]
  </code></pre>
  
  <p>I want to parse this Json into something like this.</p>
  
  <pre><code>{"Developer" : [{"chrempName" : "Test Employee1"},
                      {"chrempName" : "Test Employee2"},
                      {"chrempName" : "Test Employee5"}],
  "Tester" : [{"chrempName" : "Test Employee3"},
                      {"chrempName" : "Test Employee6"}],
  "Analyst" : [{"chrempName" : "Test Employee4"}]}  
  </code></pre>
  
  <p>How can I acheive this?   My motive is to group all the employees according to their designations.  </p>