title: vue js DO NOT sort array by keys
body: <p>I have made a shopping cart with vue js and want to keep products displayed in the order they have entered. The problem is the products are associative arrays with their id's used for keys
  something like <code>[1 =&gt; ['name' =&gt; 'product1', 'price' =&gt; 100', 'quantity' =&gt; 1]]</code>
  Where the key 1 is the id of the product. The problem is when I return the cart object as json that the products array is ordered by default by view by it's keys.
  Here's my code:</p>
  
  <pre><code>let app = this 
  axios.post(app.addToCartRoute, {
      _token: '{{ csrf_token() }}',
      product_slug: slug
  })
  .then(function(response) {
      if(!app.showCart) {
          setTimeout(() =&gt; {
             app.cart = response.data
          }, 250)
      }
      else {
          app.cart = response.data
      }
          app.showCart = true
          console.log(response.data)
  })
  .catch(function(error) {
      console.log(error)
  })
  </code></pre>
  
  <p>Let's say I first add product with id 3 to the cart the array looks like this: <code>[3 =&gt; ['name' =&gt; 'product3', 'price' =&gt; 15.00]]</code> and then I add product with id 1 the array starts looking like this: <code>[1 =&gt; ['name' =&gt; 'product1', 'price' =&gt; 13.00], 3 =&gt; ['name' =&gt; 'product3', 'price' =&gt; 15.00]]</code>
  I dont want that but vue js seems to order them by default. How to avoid that?</p>