Array selector function by property value
<p>I have:  </p>

<pre><code>var array = [ { key: '1' }, { key: '2' }, { key: '3' } ]
</code></pre>

<p>I want:</p>

<pre><code>var obj = getFirstItem(array, 'key', '2');
</code></pre>

<p>And as a result:</p>

<pre><code>obj = { key: '2' }
</code></pre>

<p>Is there such function in JavsScript or jQuery?</p>
