title: Creating and selecting a group programmatically with Fabric.js
body: <p>Let's say I have a canvas containing 6 objects and a button outside of canvas.</p>
  
  <p>When I click this button, 3 of this objects will to become a group and selected, objects will keep their positions relative to canvas.</p>
  
  <p>Is that possible?</p>
  
  <p>I tried so many things but could manage it to work. The solution that I'm looking for is something like below.</p>
  
  <pre><code>var objectList=[1,2,3];    
  var newgroup = new fabric.Group();
  
  $.each(objectList, function (i) {
      var obj = canvas.item(i);
      newgroup.add(obj.clone());
      canvas.remove(obj);
  });
  
  canvas.add(newgroup)
  canvas.setActiveGroup(newgroup);
  canvas.renderAll();
  </code></pre>