I am using ruby on rails to create a cookie that returns an array containing the params of the request back to the view as a string. However, I get the following error when I JSON.parse that string:
JSON.parse('%7B%22specialty%22%3A%5B%22Anesthesiology%22%5D%7D')
Uncaught SyntaxError: Unexpected token % in JSON at position 0
how do I fix this?