Function to match a field
<p>I am trying to return a value (ID), matching another field (Type) in the array.</p>

<p>Object array:</p>

<pre><code>a: Array[3]
0: Object
1: Object
Desc: "Desc"
ID: "V000002"
Type: "SK"
__proto__: Object
2: Object
length: 3
</code></pre>

<p>find method:</p>

<pre><code>ns.find = function (a) {
        $.each( a, function (k, v) {
                if (v.Type == 'SK') {
                    return v.ID
                }
            }
        );
        return "";
    }  ;
</code></pre>

<p>It doesn't work even though there is a match. what's wrong!</p>
