title: How to group SAPUI5 OData before bind to control at client side?
body: <p>I have an odata list for example in JSON notation:</p>
  
  <pre><code>var data = [
   {"category" : "A", "value" : 1, "group" : "x"},
   {"category" : "B", "value" : 2, "group" : "y"},
   {"category" : "C", "value" : 3, "group" : "x"},
   {"category" : "A", "value" : 4, "group" : "y"},
   {"category" : "A", "value" : 5, "group" : "x"}
  ];
  </code></pre>
  
  <p>First of all I filter against <code>group == x;</code> Values left are:</p>
  
  <pre><code>var data = [
   {"category" : "A", "value" : 1, "group" : "x"},
   {"category" : "C", "value" : 3, "group" : "x"},
   {"category" : "A", "value" : 5, "group" : "x"}
  ];
  </code></pre>
  
  <p>Now I would group (at client side) by category and sum up the values, so the result should be:</p>
  
  <pre><code>var data = [
   {"category" : "A", "value" : 6, },
   {"category" : "C", "value" : 3, },
  ];
  </code></pre>
  
  <p>After that I would bind the model to some SAPUI5 control.</p>
  
  <p>But the grouping part seems not possible.</p>
  
  <p>Does someone know a generic solution for that problem?</p>
  
  <p>A potential use case:</p>
  
  <pre><code>var oDataset = new sap.viz.ui5.data.FlattenedDataset({
      dimensions : [ {axis : 1, value : "{category}", name : "Category" } ],
      measures : [ {value : "{value}", name : "Value" } ],
      data : {
          path : "/Data"
      }
  });
  
  var oGraph = new sap.viz.ui5.Donut({
      dataset : oDataset, // sap.viz.ui5.data.Dataset
  });
  </code></pre>