Within my JavaScript file, I am retrieving data from the server using an Ajax call:
this.$http.get("/data?startDate="+this.filtres.startDate+" "+this.filtres.startHour+"&endDate="+this.filtres.endDate+" "+this.filtres.endHour).then(function(response) {
this.todos = response.body;
this.$forceUpdate();
});
The structure of response.body is as follows:
(1) [...]
0: Object { nbPieces: Getter & Setter, TRE: Getter & Setter, TRS: Getter & Setter, ... }
__ob__: {…}
dep: Object { id: 35, subs: [] }
value: Array [ {…} ]
vmCount: 0
<prototype>: Object { walk: walk(), observeArray: observeArray(), … }
length: 1
My goal now is to assign the values of nbPieces, TRE and TRS to variables. I attempted to use response.body.values()
but it did not work as expected.