I am using jQuery. I am dealing with JSON object and time and again I need to look at the data. I do alert(data) and I get nothing useful.
In the Prototype world they have inspect method which is highly useful. inspect method in Prototype
I am looking for equivalent method in jQuery. I looked at the API and couldn’t find anything. I am sure someone would have developed some plugin to solve this problem.
I have the best result with http://www.JSON.org/json2.js. As the docs say:
Just include the library and call
alert(JSON.stringify(data))to see a legible representation of your object.