title: ANgular js : Filter unique values and new json
body: <p>i have a list in json and ai need it with unique values</p>
  
  <pre><code>[
      {
          "equipmentType": "5 MEG DOCSIS",
          "status": "On Truck ",
          "count": 2
      },
      {
          "equipmentType": "5 MEG DOCSIS",
          "status": "Return Faulty",
          "count": 3
      } ]
  </code></pre>
  
  <p>I need like that  with unique equipmentType :</p>
  
  <pre><code>[
          {
              "equipmentType": "5 MEG DOCSIS",
              "On_TruckCount": 2,
              "Return_Faulty": 3
  
          }
  ]
  </code></pre>
  
  <p>Help me to find out solution of that problem 
  Thanks in advance.. </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I am trying with that but its wrong, here obj is json obj.</p>
  
  <pre><code>$scope.equipmentDashboard = obj;
  $scope.oldEquip="";
  $scope.listtest='';
  $scope.test = [];
  angular.forEach(obj, function(value, key) {
      if(value.equipmentType == $scope.oldEquip.equipmentType){
          if(value.status=="On Truck ")
              $scope.listtest.onTruck = value.count;
          else
              $scope.listtest.returnFaulty = value.count;
      } else {
          $scope.test.push($scope.listtest);
          $scope.oldEquip = value;
      }           
  });
  </code></pre>