jQuery grep with two arrays?
<p>Is it my syntax, or is what I'm trying to do just completely the wrong way of going about this? </p>

<p>I have two arrays that are populated by whatever attributes the user selects. Then I'm trying to use $.grep() on a json file to select pillows that match their search. So in the example below, I'm trying to find all pillows with a "down" fill and a "low" price.</p>

<pre><code>var activevars = ['fill','price']; 
var activeattributes = ['down','low']; 
pillowSelection = $.grep(data.pillow, function (a) { 
return $.inArray(a[activevars], activeattributes) &gt; -1;
});
</code></pre>

<p>I'm a tenacious Googler, but this has me stumped. Thanks so much in advance for any clues.</p>
