So the issue is that your response does not contain an array of data, but instead an object with ID keys pointing to the data. Unfortunately, this sort of data transformation is not possible directly from the REST data configurator.
Are you able to edit the current endpoint or create an additional endpoint that would return the jobs objects inside an array?
Alternatively, you could define the item schema manually into an app/page variable, use HTTP request to fetch the raw response, then use a formula to map the data into an array for Set page variable:
I tried your alternative suggestion and add the item schema manually into an app variable.
Then I used the http request node to fetch raw response.
But the last step (“use a formula to map the data into an array for Set page variable”) is where I am stuck.
Do I need to change anything in this formula: VALUES(outputs["HTTP request"].resBody.jobs)
Some values I want to use from my feed are "title, “url” and “posted_date”.
On the screenshot you can see the raw response I get from the JSON feed.
Jo_Li, maybe I could help, but the screen shot needs to have visible the first instance of the object in your initial question and some lines before it, in order to identify the structure of the API response.
Looking up your data, the most probable cause for the REST API direct integration not returning an array, but an object is in the GETALL return schema, which should reflect your data structure buy can have some variations depending on your database engine. Since the key for each set of data is a number, it will be rather long and prone to problems if there are new sets (the schema would change with every modification to the data and as the return data wouldn’t match the schema, it will be treated as an object, not an array). In the following image you can see the problem:
As you can see in the following example, the record number is not a key but a simple value and the data sets is inside the “fields” key (inmutable)
Not sure where this all landed, but I had the same issue today while testing a connection. The problem ended up being the use of the ‘Resource URL’ in the ‘response key path’ input. I am NOT a coder, so I found this forum and realized my issue through the tutorials post by Steve Stava on YouTube. Just posting in the event this helps someone else down the road.
Hello, I am running into the same issue the OP had. I am hoping you can elaborate a bit more on the solution you found. Did you need to add or remove something to the ‘response key path’? Thanks in advance:)