title: Vue.js add objects to existing array
body: <p>I'm trying to add elements from json response to my existing array by clicking on a button but I have a problem with adding these elements properly. </p>
  
  <p>Here I have an empty array called results where I'm storing my data from response.</p>
  
  <pre><code>export default {
    name: 'Posts',
    props: ['user_id'],
    data: function(){
        return{
            results: [],
            pageNumber: 1,
        }
    },.....
  </code></pre>
  
  <p>This is my method for getting data:</p>
  
  <pre><code>getData: function () {
  
      var vm = this;
  
      axios.get('http://127.0.0.1:8000/api/posts?page=' + vm.pageNumber)
      .then(function (response) {
          vm.results += response.data.data;
  
      })
      .catch(function (error) {
      });
  
  },
  </code></pre>
  
  <p>In this method I'm adding response data to array like this:</p>
  
  <p><strong>vm.results += response.data.data;</strong></p>
  
  <p>My respose is correct but after this operation my results array look like:
  "[object Object],[object Object]..."</p>
  
  <p>I have also tried to add new elements by push method:</p>
  
  <p><strong>vm.results.push(response.data.data);</strong></p>
  
  <p>But then, elements are added in new arrays but I want to add objects to existing array.</p>
  
  <p>Here is the structure of my response:</p>
  
  <pre><code>{"current_page":1,
  "data":[
  {
  "id":60,
  "title":"Post 1",
  "body":"Post 1 body",
  "created_at":"2018-06-09 18:33:40",
  "updated_at":"2018-06-09 18:33:40",
  "user_id":8
  },
  {
  "id":61,
  "title":"Post 2",
  "body":"post 2 body",
  "created_at":"2018-06-09 18:33:40",
  "updated_at":"2018-06-09 18:33:40",
  "user_id":8
  },
  etc...]
  </code></pre>