How to stop iterator from acting on multiple steps?

I tried a workflow and had used iterator to loop through multiple arrays in a JSON object and as a next step insert them into the datastore. But i expected the iterator loop to end there. But it just continues beyond that step to the subsequent steps. The iterator has to end inside the red box and must not extend its functionality to the last step. But I see that it’s continuing

How do i stop that?

Hey @juniorbansal!

That’s how the iterator works and there’s no way to change it but you can use it’s counterpart, the aggregator to “close the loop”, Just select the Iterator as the source module:

I hope that helps!

edit: if you just want to close the loop, you don’t need to map anything else other than the source module. You can use any type of aggregator as well, not just the array aggregator.

1 Like

Thank you. that helped

1 Like