title: Turn input field value into array of strings
body: <p>I am working with an API that accepts an array of strings from an input field called #tags. What is the best way to do that? It should also remove any commas between the "tags" and be [] if no tags. </p>
  
  <p>input: tag1, tag2, tag3
  becomes: ["tag1", "tag2", "tag3"]</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;input id="tags" type="text" placeholder="tags" name="" value=""&gt;
  </code></pre>
  
  <p>how im currently getting the tag value:</p>
  
  <pre><code>createPost('canvasID',{tags:$('#tags').val()});
  </code></pre>