Is there any method to getting out of the forEach() like any break loop method?
Discussion posts and replies are publicly visible
Nope. You can add an if condition in the a!forEach() and where you want to add a break, you can start putting null instead. And in the end, you can reject all the null values. -UPDATE-Adding the code block below.
reject( a!isNullOrEmpty(_), a!forEach( items: enumerate(10), expression: if(fv!item < 5, fv!item, null) ) )
instead of null, have it output empty set ({}). These will disappear from the output array (unless all results are an empty set - if this corner case is possible just wrap the a!forEach() in a!flatten() and the list of empty sets will be collapsed to an empty set).
Wow. Didn't know that. Thanks, Mike!