title: If or Case with Mustache
body: <p>I'm struggling with taking the data {{State}} which is the verbose US state name, &quot;Georgia&quot;, for example, and return &quot;GA&quot; for us in the postal address.   Since Mustache is logic-less, I'm stumped.</p>
  <p>UPDATE:
  I think I need to use java script to do this but I'm at a loss using javascript with Mustache to pass in {{State}}, go through a switch statement and return the switch output to mustache.
  What I have so far is:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;label&gt; State Abbreviation: &lt;/label&gt;&lt;span id='stateabb'&gt;&lt;/span&gt;
  &lt;script type = "text/javascript"&gt;
  
  var BillTo =[
  {{#Invoice.Account.BillTo}}
  {
  "state":"{{State}}"
  },
  {{/Invoice.Account.BillTo}}
  ];
              switch(state) {
                 case 'New York';
                  var stateabb = 'NY'
                 break;
                default:'asfasfd'
              }
  document.getElementById('stateabb').innerText = state;
  
  &lt;/script&gt;  </code></pre>
  </div>
  </div>
  </p>