REST Connector - JSON traversing with spaces in keys?
We have a custom REST connector to Airtable, which returns JSON data. As an example:
{"records":
[
{
"id":"id here",
"fields":{
"Service Date":"2017-09-01",
"Customer #":"182904",
"Total Billable Amount":47.50
},
"createdTime":"2018-06-14T19:20:46.000Z"
},
...
]
}
We want to transform the "Service Date" from text to datetime. My question is how to accomplish this given the space in the field name. We have tried doing so in the config.json file by using bracket notation:
"TransformTypes": [
{
"Name": "fields.['Service Date']",
"Type": "DateTime"
}
]
But this doesn't seem to work. What is the best way to handle situations like these? If only dot notation is supported, then we could get our client to change their Airtable column headers to avoid spaces; but if there's a workaround I would like to know, as I can imagine this kind of situation happening repeatedly. Thanks in advance to anyone who can help!
-
Thanks so much for the suggestion, Limor! I wasn't aware that connector existed, and I'll definitely look into it.
In case my original problem comes up in other use cases, however - is there a way around the dot notation problem I describe? Or is it best to get the client to eliminate spaces on their end so that regular dot notation will work?0
Please sign in to leave a comment.
Comments
2 comments