Search in a two dimensional array and return the array list as a array
<p>How can I search in a two dimensional array and return the array list as a array?</p>

<pre><code>var dataSet = new Array(new Array());
function searchAsset(){
    dataSet.length = 0;
    var fileName = document.getElementById("fileName").value;
    var arr = new Array(["view_page.psd","test"],["ok_test.jpg","yes","kk"],["new_banner_2009.fla","good"],["gps-new-web.html","hot"]);
    var re = new RegExp(fileName ,'i');
    var res = null;
    for(var i = 0;i&lt;arr.length;i++){
            var newArr = arr[i][0];
            //alert(newArr+":"+newArr.match(re));
            var res = newArr.match(re);
        if(res != null){
            dataSet.push("["+arr[i]+"]");
        }
    }
    alert("Final --- "+dataSet);
    for(var m = 0;m&lt;dataSet.length;m++){
        alert(dataSet[m]);
    }
}
</code></pre>
