search for element within an array
<p>My <code>data[l][m]</code> contains <code>1,2,3,4,5</code>
I'm trying to search for a particular number, say '2' in it. Is there a better way to do this?</p>

<pre><code>for (var n = 0; n &lt; data[l][m].length; n++) {
    if(data[l][m][n] == num){ // num is equal to '2'
        number = data[l][0];
        document.form.options[l-1] = new Option(number,number,true,true);
    }
}
</code></pre>

<p>And how about in: <code>['id1',['a',[1,2,3,4,5]],['b',[3,4,5,6,7]]]</code><br>
Many thanks in advance.</p>
