Jq Error Cannot Index Array Function In Javascript