title: Select2: tagging using an array from remote data?
body: <p>I'm starting with Select2. I want to combine "Tagging Support" and "Loading remote data" (see <a href="http://ivaynberg.github.io/select2/" rel="nofollow">http://ivaynberg.github.io/select2/</a>).</p>
  
  <p>In the body of an HTML file, I presently have an input form:</p>
  
  <pre><code>&lt;input id="topics"&gt;
  </code></pre>
  
  <p>with "Tagging Support" using a list of tags given by an array, as the following script of the head of the HTML file shows:</p>
  
  <pre><code>$("#topics").select2({
       placeholder: "Choose topic(s)",    
       tags:["russia", "europe", "obama"]
  }); 
  </code></pre>
  
  <p>I also have a server, made in Node.js using Express, that is connected to a database. I know how to handle requests (POST or GET) on the server side, in connection with the database.</p>
  
  <p>For the input form of my HTML file, I want, instead of the array ["russia", "europe", "obama"], to use an array of data provided by the server.</p>
  
  <p>How could I write it?</p>
  
  <p>Thanks!</p>