В моем файле Javascript я получаю данные с сервера с вызовом Ajax:
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();
});
response.body выглядит так:
(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
Теперь я хотел бы поместить значения nbPieces, TRE и TRS в переменные. Я пытался сделать response.body.values()
, но я не работал.