Solved

from json to table

Posted on 2014-02-16
3
203 Views
Last Modified: 2014-02-16
for ex let's say we have this data:
var data = {
      header: ["First Name", "Last Name"],
      rows: [
            ["The", "Pope"],
            ["Ronald", "Reagan"],
            ["George", "Bush"]
      ]
};

i'm having issues with the following:

i need code that will turn this into a table (Not using datatables but just a simple html table) and take into account a varying number of columns.

thanks
0
Comment
Question by:dgrafx
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 39863096
you will find many examples on the net to do this, here is one good examples:
https://github.com/afshinm/Json-to-HTML-Table
0
 

Expert Comment

by:mokaid83
ID: 39863103
0
 
LVL 25

Author Closing Comment

by:dgrafx
ID: 39863159
Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question