Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Airtable.js Query
const requestContent = (tableId, tableName) => {
let _content = []
return new Promise((resolve, reject) =>
base(tableId)
.select({
view: tableName
})
.eachPage(
rows =>
rows.forEach((row, index) => {
_content.push(row.fields)
return resolve(_content)
}),
_err => reject(_err)
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment