I am looking to create an HTML version of a JSON, through JavaScript(jQuery), specifically the unofficial Google Dictionary JSON (http://googlesystem.blogspot.com/2009/12/on-googles-unofficial-dictionary-api.html).
The problem I am facing is that the JSON is not readable because it has this in front of it “dict_api.callbacks.id100(” and is trailed by “,200,null)“.
How can I remove this and then put it into a JSON object such that I can attach the elements to the HTML. Thanks in advance.
This is a JSONP response.
It calls a function specified by the
callbackparameter to give you the response.You should create a global function to handle the response, and pass its name as the
callback.jQuery will do this for you: