jJsonViewer is a jquery plugin which you can call on any jquery element. This function takes
stringified JSON as input which will be converted into html and added into given element.
How to use -
- Include both in your html page.
- Now call jJsonViewer on any element and pass it a json data
1 2 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Enjoy collapsing and expanding over each JSON object and array. :)
Collapsed tree -
If you want the json tree to be collapsed by default, you can do so by providing `expanded: false’ option.