title: Input and output comma separated list from/to textbox
body: <p>I have an array similar to this:</p>
  
  <pre><code>list = {
    cat: "dog",
    rain: "sun",
    baby: "adult"
  };
  </code></pre>
  
  <p>I have 2 textboxes. </p>
  
  <p>If I type a list separated by comma into one textbox like this:</p>
  
  <p><strong>cat, rain, baby</strong></p>
  
  <p>and press a button, how can I get the paired values in the same comma separated list in another textbox like this?:</p>
  
  <p><strong>dog, sun, adult</strong></p>
  
  <p><strong>Edit:</strong> Additional optional question - is it also possible to include other text not in the array but still parse for the ones in the array? For example, if I type "hug my cute cat", it outputs "hug my cute dog", etc. </p>
  
  <p>Any clue/direction would be much appreciated! Thank you!</p>