How do I iterate through an array of results from a step?

Dylan Sather (Pipedream) : Hi , to do this right now, you’ll need to write just a bit of Node.js code. Here’s a good reference on loops.

Within the step where you want to iterate, you’ll need to modify the code of that step - just click into the step and start typing. At the top of the step, you’ll need to iterate over the array of results (steps.airtable_get_tasksOutstanding.$return_value.records), running the original code of the step for each element of the array:

for (const record of steps.airtable_get_tasksOutstanding.$return_value.records) {
  // original code here
}

It looks like each record is an object, so you can reference record.fields to grab the fields for each item in the array, for example.

We’re tracking the ability to loop through steps natively in the Pipedream UI, if you’d like to follow that issue for updates.

Let me know if this helps or if you have any other questions.