[Vuejs]-How to run GET request in for loop with vueJS?

0👍

try this:

this.$axios.
get(this.$baseUrl + 'job/result/'+jobid).
then(response =>
{
 this.jobs = response.data 
}
) 

by doing this, you are passing the response to your jobs data

0👍

Return your axios result when you calling this.

Example:

getResult: function(jobid)
     {
       return this.$axios.get(this.$baseUrl + 'job/result/'+jobid).
        then(response =>
        {
            return response.data
        })
     }

Leave a comment