title: switch statement in mustache.js
body: <p>Is there a way to make a switch statement in Mustache.js</p>
  
  <p>I have a variable which can be one of the four different values.
  Depends on its value I want to output slightly different template.</p>
  
  <p>Is there a way to do this?</p>
  
  <p>P.S I have seen this <a href="https://stackoverflow.com/questions/10117862/switch-case-in-mustachejs">question</a>, but nevertheless the question sounds the same, but in the answer the person was answering how to achieve if/else functionality, which I can find <a href="https://stackoverflow.com/questions/6027525/how-do-i-accomplish-an-if-else-in-mustache-js">here</a>. </p>
  
  <p>Explanation about the code:</p>
  
  <p>I have a list of templates </p>
  
  <pre><code>var templates = {
      friends :
          'here there is some html with {{vars}}'+
          'and a button on which I have to write something like'+
          'add to friends | already your friend | invitation was sent | your invitation was rejected'
      }
  }
  </code></pre>
  
  <p>So basically I am doing an ajax call and together with <code>vars</code> it returns me <code>type</code>, which can be one of the following things <code>0,1,2,3</code>. Depending on this, I have to write specific text</p>