0👍
var myTps = [];
function loadTps(data) {
data.forEach(element => {
myTps.push(element.tps_no)
});
}
function getTps() {
let url = '/dpdraft2/index/getTps';
const my = this;
var res = axios.get(url)
.then(function(response) {
loadTps(response.data)
})
.catch(error => console.log('error axios'));
}
Source:stackexchange.com