writing generic filter using grep in jQuery
<p>Is there a way i can write the following piece of code to be more generic?</p>

<pre><code>var result = $.grep(myObjectArray, function(e){ 

    return e.Prop1 == 'SomeVal';

});
</code></pre>

<p>This is what i want to do.</p>

<p>A generic function that will accept <code>myObjectArray</code> (Object Array to filter), <code>Prop1</code>(Property name) and <code>SomeVal</code> (Value to filter) as an argument. </p>

<p>The problem i am facing is that i dont know how will i find the PropertyName in the object as it can be anything.</p>

<p>Any help will be highly appreciated.</p>
