add function to remove trailing slash
remove trailing slash from url to get json data