Hi All,
I am trying to return field from an API that have hypens in it (“email-address” & “company-name”). Please see my code below. I tried using JSON.Stringify and that didn’t work. Any ideas?
pack.addSyncTable({
name: "People",
description: "List of people",
identityName: "Person",
schema: PeopleSchema,
connectionRequirement: coda.ConnectionRequirement.None,
formula: {
name: "SyncPeople",
description: "Sync people.",
parameters: [],
execute: async function ([], context) {
let response = await context.fetcher.fetch({
method: "GET",
url: "https://accttwo.teamwork.com/people.json",
});
let people = response.body.people;
let result = [];
for (let person of people) {
result.push({
id: person.id,
name: person.name,
company_name: person.company-name,
email_address: person.email-address,
});
}
return {
result: result,
}
}
}
})