How can I use the Airtable API to retrieve solely the ‘Name’ field and verify if a designated name exists?
let apiBase = 'https://api.airtable.com/v0/';
let tokenKey = 'Bearer ABCDEFGHIJ';
let recordBase = 'ABCDEFGHIJ';
let tablePath = '/MyRecords';
let endpointURL = apiBase + recordBase + tablePath;
console.log(endpointURL);
let apiRequest = new Request(endpointURL);
apiRequest.method = 'GET';
apiRequest.headers = {
'Authorization': tokenKey,
'Accept': 'application/json',
'fields': 'Name'
};
let resultData = await apiRequest.loadString();
console.log(resultData);