Sysadmin here, with vehement hate for JS: Just use fucking Python, hell even fucking Perl, bash is a disease of the mind; every time I try to debug some complex legacy bash script I start thinking JS might not be so bad of a language and no language should make you think that.
I do use python, when bash doesn't make sense. Perhaps in this case dealing with API's Python was the better choice...but, the parent comment just blanket bashed Bash, and so did you. ;)
I have no issue with bash, it's simple to use even for complex scripts.