Push object to array of objects on click

So I have a vue.js app that has objects being rendered in a single list with two columns as shown below:
enter image description here

When I click on the "X" on the object, I get the following return:
enter image description here

So the method is shown below:

remove(x) {
    console.log(this.$data.list.selected[x]);
    console.log(this.$data.list.available);
    console.log(x);
},

The this.$data.list.selected[x] is the object in the left column, and the array of objects is in this.$data.list.available.

What would be the best way for me to remove the object inside my method and then push it to the end of the array in this.$data.list.available – All help would be appreciated!

37 thoughts on “Push object to array of objects on click”

  1. 458035 479251I dont feel Ive read anything like this before. So very good to locate somebody with some original thoughts on this topic. thank for starting this up. This website is something that is necessary on the web, someone with a little originality. Good job for bringing something new towards the internet! 926433

    Reply

Leave a Comment