I’m working with an Airtable database and can successfully pull records using their API. Right now my code only shows data from one column called “Location”. I want to also display values from another column named “Size” at the same time.
Currently I’m using console.log('Found: ', record.get('Location'));
to show the Location data. I tried changing it to console.log('Found: ', record.get('Location', 'Size'));
but that approach failed.
My current code looks like this:
// Fetch 3 records from Products table
base('Products').select({
maxRecords: 3,
view: "Main view"
}).eachPage(function page(entries, fetchNextPage) {
entries.forEach(function(entry) {
console.log('Found: ', entry.get('Location'));
});
fetchNextPage();
}, function done(error) {
if (error) { console.error(error); return; }
});
Current output shows:
Found 170000118
Found 170000119
Found 170000120
What’s the right way to get both Location and Size field values in the same output?