I use the following code and I need to exit the loop when the condition is true,I try with every and some without success,any idea?

the *array* is given and I cannot change it,
currntly when condition is true the loop is still processing...

<https://jsfiddle.net/z4oxsa1b/10/>

```
 var json = {
  "prov": [
    {
      "save": {
        "pa": "aa",
        "func": "sa"

      },
      "delete": {
        "pa": "sof",
        "func": "delete"

      }
    }
  ]
};

var array = [];
array.push(json);

_.filter(array, function (config) {
    config['prov'].some(function (provider) {
        _.every(provider, function (config) {
            if (config.pa === 'aa') {
                //now need to exit
                console.log("true")
            }
        });
    });
});

```

UPDATE: the answers are not helping ,assume that I call to the filter loop inside method I want to **exit this** **method** when the if condition is true...