Skip to content

Get Iterator index of previous loop #11298

Closed Answered by ConorWebb96
koneubauer asked this question in Help
Discussion options

You must be logged in to vote

Hey @koneubauer,

I would suggest that you look at the JS SCRIPTING action that you can add, with this you may be able to do the more complicated logic that you're after related to steps 1 and 2 you talked about. As I don't have your configuration I'd suggest doing something along these lines for the additional step after 1 and 2;

  const dataStep1 = {{ steps.1.response }};

  const resultsStep2 = [];
  for (let index = 0; index < dataStep1.length; index++) {
    const row = dataStep1[index];
    const start = row.start;
    const destination = row.destination;
    const distance = {{ steps.2.items }};
    const result = { distance: distance, otherData: row.otherData };
    resultsStep2.…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by koneubauer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants