Naveen Kumar
Naveen Kumar

Reputation: 1

How to fix the "SyntaxError: Unexpected token: a" with importjson in Google Sheets

I am trying to import the following link into Google Sheets with importjson and am facing the following error:

https://sas.indiatimes.com/TechnicalsClient/getMACD.htm?crossovertype=MACD_CROSSED_ABOVE_SIGNAL&pagesize=25&exchange=50&pageno=1&sortby=volume&sortorder=desc&indexid=2365&company=true&ctype=MACD&callback=ajaxResponse

SyntaxError: Unexpected token: a (line 128).

Any ways to fix this?

Upvotes: 0

Views: 600

Answers (1)

Jesse Sliter
Jesse Sliter

Reputation: 243

Well the stuff being returned to you is JSONP, not just regular JSON, so that could be your issue. jsonp is bascially a json object being wrapped by a function, in this case ajaxResponse.

Upvotes: 2

Related Questions