I’m currently trying to display JSON data as a table
in a web page: the raw data from the API url looks like this:
{"body":"[{"id":"67341472528","name":"Dana Fin"},{"id":"87543263550","name":"Jon Doe"}]"}
I was trying to use the jQuery/AJAX $.getJSON() Method and it displays the data like this:
[{"id":"67341472528","name":"Dana Fin"},{"id":"87543263550","name":"Jon Doe"}]
but then I’ve been trying to put that data into a table for a while, I’ve tried a lot of things and examples but nothing has worked.
so basically I was wondering if somebody has done something like this, thanks
2
Answers
Try something like this:
Here is a working CodePen
Using a slightly terser syntax: