Im trying to get the response.data from an axios get request. I am not able to get the data out of the request. I have this code:
var crops;
axios.get(cultivos_services).then(result => {console.log(result.data);crops = result.data;}).catch(error => {console.log(error);});
console.log("crops = " + crops);
And I am getting this in the console:
so I can see the axios get is working but I cannot save the response in the crops variable.