Bash Loop Through Array Variable Javascript