[Vuejs]-Vuetify data-table not showing data

0👍

Please modify getdata method as below and it should work

      getdata() {
  this.$http.get('https://api.rootnet.in/covid19-in/stats/latest')
  //  .then(response =>{
  //    return response.json();
  //  })
    .then(res =>{
       console.log('api res ',res)
      const data = res.body.data;
      this.indiaTotalCase = data.summary.total;
      this.indianDeaths = data.summary.deaths;
      this.indianDischarged = data.summary.discharged;
      const regionalData = data.regional;
      //  for(let index in regionalData){
      //    this.users[index] = regionalData[index];
      // }
      this.users = regionalData;
    });

Leave a comment