title: Grouping Json Array Object
body: <p>My source data is in standard JSON format. But I want format the data in grouping so that the Original data can be grouped by Catname and Catid. </p>
  
  <p>Tough I have tried loadash library on the front end. But don't want to use it on front end.</p>
  
  <pre><code>var originalData = [
  {
      "quesid": 1,
      "uoptid": 0,
      "catid": 1,
      "catname": "Soft Skill"
  },
  {
      "quesid": 2,
      "uoptid": 0,
      "catid": 1,
      "catname": "Soft Skill"
  },
  {
      "quesid": 3,
      "uoptid": 0,
      "catid": 2,
      "catname": "Technical"
  },
  {
      "quesid": 4,
      "uoptid": 0,
      "catid": 2,
      "catname": "Technical"
  }
  ]
  </code></pre>
  
  <p>Desired as below:</p>
  
  <pre><code>        var transformData = [
          { 
            catname: "Soft Skill",
            catid : 1,
            ques : [ 
      {quesid : 1, uotp : 0 },
      {quesid : 2, uotp : 0 }
      ]
  },
  {
            catname: "Technical",
            catid : 2,
            ques : [ 
      {quesid : 3, uotp : 0 },
      {quesid : 4, uotp : 0 }
      ]
  }
     ]
  </code></pre>