I am struggling a bit with $.grep and comparing Arrays.
It's a specific question so I'll try to keep it as simple as possible.

I've got an Array with a list of Shops which contain a list of extras.
e.G toilet, wifi and coffee. [toilet: "1", wifi: "0", coffee: "0"]

And I've got input fields (checkbox).

```
var extras = [];
$(".input-extra").on("change", function(e){
    if(this.checked){
        extras.push(this.name);
    }else{
        extras.remove(this.name);
    }
});

```

If I check an input checkbox field, my Array will get filled with the name of the input field (e.g "toilet")

Now I'd like to display shops which agree with my input fields. (Sorry, I don't know how to discribe it better, so I posted some examples)

e.G shop1 offers coffee and wifi. I'm looking for shops with wifi.
So shop 1 will be displayed.

shop2 offers coffee and a toilet. I'm looking for shops with wifi.
shop 2 won't be displayed.
That works fine: but how can I embed extras?

```
function fillShopListFilter(data, zip, extras, pricemin, pricemax, squaremetermin, squaremetermax) {

    var length = $.grep(shortShopList.shops, function( n, i ) {
        return zip.includes(parseInt(n.zip)) && parseInt(n.price)>=pricemin && parseInt(n.price)<=pricemax && parseInt(n.squaremeter)>=squaremetermin && parseInt(n.squaremeter)<=squaremetermax;
    });
.....
}

```

I think that's clear.

Thanks for EVERY answer.