Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

258
Views
axios response.data not available outside axios request

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:

enter image description here

so I can see the axios get is working but I cannot save the response in the crops variable.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!