Bash Loop Over Json Array Length Javascript