API Connector refer to object by id

Is it posible to refer to json object result of an API call by object ID instead of its name? I’m using Bubble API connector and in a get request I need to get a specific field (of which I know the name) of the first object but I cannot know in advance the name of this object. Response structure is like:
{
“Version”: “1.0.60.0”,
“StatusCode”: 200,
“Result”: {
Unidentified object name”: [
{
“ExternalId”: 140079,
“Direction”: -1,
“AccountID”: 13707,
“GroupId”: 31794,
“AccountName”: “SRL”,
“UnitID”: 259001470,
“LicensePlate”: “AE7TH”,
“FleetAlias”: “2090014”,
“FleetNumber”: “2090014”
}
]
}
}
When I map the response , if “first object” change its name I cannot get the field’s data as it is referred in Bubble as “first object name’s”.
Do you know a way around? Any suggestions?

A little js special sauce to make it work for you might come in handy.

I don’t see what you mean? This could be done in bubble??

I don’t see what you mean, could you be a bit more explicit? Thank you in advance.

Sorry for being unclear. I was creeping on the forum and caring for my toddler at the same time.

are you trying to grab the list of items in "Unidentified object name"

and iff so, you’re saying that property name will change from time to time and when that occurs you can no longer access that property? right?

If that’s the case, then i would use javascript to reformat the response that allows bubble to consume the data each time regardless of that property name

Thank you for your response. I had no idea that I could use js in workflow… I’ll investigate how to do so and try to build a function to sort my problem out.
Thanks a lot for you idea. BR

1 Like