Javascript examples for Array Operation:Array Convert
Search an array by converting array to string and use regex
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w ww. ja v a2s . co m*/ var test = [['code', 'name'], ['code', 'name'], ['code', 'name3'], ['code', 'name4'], ['code', 'name']]; var value = "name4"; if( test.join(",").match(new RegExp(value, "gi")) !== null ) { console.log("Found a match"); } } </script> </head> <body> </body> </html>