Bash Search Array Javascript Example