Hypothesis, I have a JSON data:
{ "data1": "value1", "data2": "value2", "data3": "value3", "data4": "value4", "data5": "value5", }
How can I achieve break, For example, Use For-each entry in path, let the loop jump out when it reaches 'data3'. At first I thought the built-in system actions Stop loop can break, But it's actually continue, Just skip the current loop, not the whole loop.
break
Stop loop
continue
Although, I have several solutions to achieve this effect. But I think they always be executed in their entirety once, rather than jumping straight out.
I hope can find a way to really break to save some of unnecessary performance?
Develop games in your browser. Powerful, performant & highly capable.
Yeah, "Stop loop" for some reason doesn't work with JSON or Array "for each" loops.
You can add a local variable continue=1. Add "continue=1" condition to the loop. When you need to stop it, set continue to 0.
Use AJAX->On completed