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

238
Views
How to save data into variable after fetching with airtable.js?

I have tried fetching data from airtable API using airtable.js

here is the code that airtable gives

var Airtable = require('airtable');
var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('app1lRj8mFkG7qy4p');

base('All Impact Organisations').find('rec3JjliAZkNmbFVX', function(err, record) {
    if (err) { console.error(err); return; }
    console.log('Retrieved', record.id);
});

and what i want is

var Airtable = require('airtable');
var base = new Airtable({apiKey: 'YOUR_API_KEY'}).base('app1lRj8mFkG7qy4p');

const result = base('All Impact Organisations').find('rec3JjliAZkNmbFVX', function(err, record) {
    if (err) { console.error(err); return; }
    else return record
});

console.log(result)

I know that is wrong code because airtable use a callback function to fetch the data, however, why I want to do that because I need to concat the result data with another record

FYI I'm using react in this problem

can somebody help me?

about 4 years ago · Santiago Gelvez
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!