jsonata-js/jsonata

Clarification : Is there Any Feature for Apply Break or Continue in Looping

sureshssb07 opened this issue · 1 comments

Hi Team,

Currently we are looping on array with 10000 items by using $map() and is there any feature or any other way for apply break/continue if the item meet certain conditional base. Because we don't want to continue further for all items in the array and needs to exit from looping.

Similarly, we are looping object by using $each() and we are looking for exist the loop after condition is matched and continue further if not match

Thanks in advance

This is not an imperative language so we shouldn't think of $map and $each as being a loop (even though they are implemented using one here). Other implementations could choose to evaluate these in parallel.