Newbie with what is likely a simple problem iterating through json

Hello, new to retool, but not new to development. I'm starting with a very simple project, just pulling some json from a rest api, and iterating through it and calling another webhook. I don't have a problem pulling the json, but I can't seem to iterate through the data. Here's the json that I'm getting (I just need to get the data.details.output for iteration):

{"data":{"code":"success","details":{"output":"[{"function_id":"4351129000110369100"},{"function_id":"4351129000110363159"}]","output_type":"string","id":"483740000003966023"},"message":"function executed successfully"},"metadata":{"status":200,"statusText":"OK","request":{"url":"","method":"POST","body":"{}","headers":{"Content-Type":"application/json","User-Agent":"Retool/2.0 (+","ot-baggage-requestId":"undefined","x-datadog-trace-id":"5223809179723930273","x-datadog-parent-id":"8474434022758973577","x-datadog-sampling-priority":"-1","traceparent":"00-0000000000000000487eb2c5a3de9aa1-759b3cd81f088089-00","tracestate":"dd=s:-1","X-Retool-Forwarded-For":""}}}}

Here's the javascript I'm using to iterate:
const results = [];
for (const [index, value] of ) {
const result = call_async_function_lambda.trigger();
return await Promise.all(results)

For some reason, it returns an array of null values: [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]

What am I missing????

THanks in advance!

Hey @Matthew_Weiner! It looks like your API is returning a string instead of an object as its result. You might try something like

const outputArray = JSON.parse(;

and then iterate over outputArray instead.

I'm also curious to know what you'd like to do with the values in the array, it might be helpful to use additionalScope as in these examples. Furthermore, if you're looking to destructure each element in your array with [index, value] you might want to use for(const [index, value] of outputArray.entries()).

Let me know if any of that is helpful!