title: V-for in alphabetical order
body: <p>I'm having some issues sorting/ordering my v-for table in alphabetical order. I've tried things like <a href="https://stackoverflow.com/questions/42883835/sort-an-array-in-vue-js">Sort an array in Vue.js</a> but I can't get it to work for me?</p>
  <pre><code>    &lt;tbody&gt;
        &lt;tr v-for=&quot;(client, index) in clients&quot; :key=&quot;index&quot;&gt;
          &lt;td&gt;{{ client.name }}&lt;/td&gt;
          &lt;td&gt;{{ client.contactpersonfirstname }} {{ client.contactpersonlastname }}&lt;/td&gt;
          &lt;td&gt;{{ client.email }}&lt;/td&gt;
          &lt;td&gt;{{ client.phone }}&lt;/td&gt;
          &lt;td&gt;
            &lt;div  :class=&quot;{ active: index == currentIndex }&quot; @click=&quot;setActiveClient(client, index)&quot;&gt;
              &lt;a class=&quot;badge badge-success&quot; :href=&quot;'/clients/' + client.id&quot; &gt;Open&lt;/a&gt;
            &lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
        &lt;/tbody&gt;
  
      &lt;script&gt;
      import ClientDataService from &quot;../services/ClientDataService&quot;;
      
      export default {
        name: &quot;clients-list&quot;,
        data() {
          return {
            clients: [],
            currentClient: null,
            currentIndex: -1,
            name: &quot;&quot;,
          };
        },
        methods: {
          retrieveClients() {
            ClientDataService.getAll()
              .then(response =&gt; {
                this.clients = response.data;
                // eslint-disable-next-line no-console
                console.log(response.data);
              })
              .catch(e =&gt; {
                // eslint-disable-next-line no-console
                console.log(e);
              });
          },
      
          setActiveClient(client, index) {
            this.currentClient = client;
            this.currentIndex = index;
          },
      
         
        },
        mounted() {
          this.retrieveClients();
        }
      
      };
      &lt;/script&gt;
  </code></pre>
  <p>Hope you can help - let me know of you need more of my code.</p>
  <p>//Rue</p>