title: VueJS & Algolia: Rename items in ais-refinement-list (VueInstantSearch)
body: <p>I want to change the item names of my search filters in the front end and I found that when using:</p>
  <pre><code>&lt;ais-refinement-list [..] :transform-items=&quot;transformItems&quot; /&gt;
  &lt;/ais-refinement-list&gt;
  </code></pre>
  <p>I can then redefine the lists labels in a method (<a href="https://www.algolia.com/doc/api-reference/widgets/refinement-list/vue/#widget-param-transform-items" rel="nofollow noreferrer">Algolia docs</a>):</p>
  <pre><code>transformItems: function(items) {
          
          return items.map(item =&gt; ({
            ...item,
            label: item.label.toLowerCase(),
          }));
          
        },
  </code></pre>
  <p>But what I need to do is rename all of the 6 filters/facets for the front end and I figured I need to do that with several if() statements. But how do I do that in this map()-method? For example how can I rename the item with label 'MC' to 'Multiple Choice'? I tried just writing</p>
  <pre><code>    transformItems: function(items) {
                  
       return items.map(item =&gt; ({
       ...item,
      
       if(item.label == 'MC'){
  
              label: 'Multiple Choice',
  
          }else{
  
              label: item.label,
          }
  
      }));               
     },
  </code></pre>
  <p>But that failed spectacularly. What's the correct way to solve this?</p>