Bash Check If Variable Is Array Javascript