Vue.js is corrupting data when setting an array
<p>So I'm getting json response from my controller, which looks simply like:</p>

<pre><code>return Plan::find($request-&gt;id)-&gt;toJson();
</code></pre>

<p>And when I'm setting the received data into the vue array, some data get corrupted, dates are being changed randomly (for exmaple, start date and end date become the same, but the network response is correct).</p>

<p>I found out that the problem is with vue.js that I'm using to control data. for now, the vue method that gets data looks as follows:</p>

<pre><code>updatePlan: function(id) {
    var json;
    $.getJSON('{{action("Controller@getJSON")}}',{id}).success(function(data) {
    {plan: id}).success(function(data) {
        json=data;
        animatedOpenModal('edit-button','editPlanModal');                       
    });
    setTimeout(function(){
        console.log(json);
        //vm.setPlan(json);
    },100);
},
</code></pre>

<p>and the commented method is</p>

<pre><code>setPlan: function(json) {
    vm.$set('current_edit_plan', json);
    console.log(vm.current_edit_plan);                  
},
</code></pre>

<p>and for now <code>console.log(json)</code> shows correct data, but if I remove <code>//</code> - everything will fall apart: dates will become incorrect in both console logs and in array itself. </p>

<p>What is this and how could it be solved? I would highly appreciate any possible help!</p>