title: What is the right way to clear select2 dropdown when using Ajax?
body: <p>I am having an issue with <a href="https://select2.github.io/" rel="nofollow">select2</a> where after I enter an item and I want to use the same dropdown again, i can't seem to remove the previously selected item </p>
  
  <p>For example, lets say my id is "#StreamName", I thought this would clear it:</p>
  
  <pre><code> $("#StreamName").val(null).trigger("change");
  </code></pre>
  
  <p>but it still seems to show the previous selected item.  From looking at the html it appears that I have brute force it by doing this:</p>
  
  <pre><code>$("#select2-StreamName-container").html("");
  </code></pre>
  
  <p>but that seems like i am not using the API properly so I wanted to see if there is another suggestion or if I am missing something.</p>