title: How to dynamically build an array of crossfilter groups?
body: <p>I have a crossfilter data structure with partly unknown columns.</p>
  
  <p>I want to draw a composite dc.js chart with the ability to dynamically switch on and off the y-Dimensions.</p>
  
  <p>Therefore I try to build an array of groups for every column:</p>
  
  <pre><code>this.data = crossfilter(this.rawData);
  
  this.idDimension = this.data.dimension(function (d) {
      return d.id;
  });
  
  for (var property in this.rawData[0]) {
      this.groups[property] = this.idDimension.group().reduceSum(function (d) {
          return d[property];
      });
  }
  </code></pre>
  
  <p>The problem is that each group works on the column of the last property in the loop.</p>
  
  <p>How can I circumvent this? Or are there better ways to accomplish what I want?</p>