title: Pass more attributes in the select2 generated element
body: <p>I use select2 library as below:</p>
  
  <pre><code>&lt;select class="js-example-basic-single;" id="countries_list" name=""&gt;&lt;/select&gt;
  
  
  countries_list = [];
  for (var property in datamap.options.data) {
       countries_list.push(datamap.options.data[property]['country']);
  }
  $("#countries_list").select2({
     data: countries_list.sort(),
   });
  </code></pre>
  
  <p>This works fine but what I need is also to pass inside the  some other attributes as well. For example the name parameter. How can I do that with select2?</p>