title: How use select2 with knockout arrays
body: <p>I got this array:</p>
  
  <pre><code>self.Tags() = ko.observableArray();
  
  $.getJSON("/myService/GetAllTags", "projectid=" + tp.ProjectId,
              function (allData) {
                  var mappedTags = $.map(allData, function (item) {
                      return new Tag(item)
                  });
  
      self.Tags(mappedTags);
  }
  </code></pre>
  
  <p>where</p>
  
  <pre><code>Tag = function (data) {
      var self = this;
  
      self.tagId = data.TagId;     
      self.projectId = data.TagProjectId;
      self.textbatchId = data.TagTextbatchId;
      self.text = ko.observable(data.TagName);
      self.tagType = ko.observable(data.TagType);
  };
  </code></pre>
  
  <p>This is my select2 HTML:</p>
  
  <pre><code>&lt;input data-bind="value: myTags, select2Value: selectedTags, select2: { tags: ko.toJS($root.Tags), minimumInputLength: 1, tokenSeparators: [',', ' ']}" /&gt;
  </code></pre>
  
  <p>myTags and selectedTags are derived from Tags with filtering and mapping.</p>
  
  <p>The projectId, textbatchId and tagType are data I need. 
  However I cannot get the select2 input to accept these values in an array.
  Neither can I get select2 to accept tagId and other data-indicated different than "id" and "text".</p>
  
  <p>Is there any way I can tell select2 to use tagId as "id" and to ignore the rest of the attributes?</p>
  
  <p>I know the select2 man pages probably say something about this, but I cannot get my head around it.
  Fiddle here: <a href="http://jsfiddle.net/vJqQy/2/" rel="nofollow">http://jsfiddle.net/vJqQy/2/</a></p>