Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7642295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:09:11+00:00 2026-05-31T09:09:11+00:00

I have the following .ajax $.ajax({ url: urlpath, type: ‘POST’, dataType: ‘json’, data: JSON.stringify(json),

  • 0

I have the following .ajax

$.ajax({

    url: urlpath,

    type: 'POST',

    dataType: 'json',

    data: JSON.stringify(json),

    contentType: 'application/json; charset=utf-8',

    success: function (data) {

        alert(JSON.stringify(data));

    },

    error: error

});

What I am passing back is a list with 3 columns. When I do alert(JSON.stringify(data));
it shows me the data – 3 columns and 4 rows of data. How do I go about parsing this and storing it into a table?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:09:13+00:00Added an answer on May 31, 2026 at 9:09 am

    Say you have a table with an id="my-table", you can substitute your alert with something like:

       $('#my-table tr').each(function (r) {
            $('td', this).each(function (c) {
                // here you cycle on every td (column) of a row to populate it
                // example with 3 columns assuming this json structure 
                // {
                     "row1": [ 100, 200, 300],
                     "row2": [ 50, 200, 400 ],
                     "row3": [ 10, 300, 200]
                // }
                this.innerHTML = data["row"+r][c]
            })
        });
    
    1. $('#my-table tr')... find create an array with your table rows
    2. $('td', this)... apply an anonimous function on every td of the loop current tr (this acts as the search context for tds
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code; $.ajax({ url: /Home/jQueryAddComment, type: POST, dataType: json, data: json,
In javascript I have the following: $.ajax({ url: /ajax/test, type: POST, dataType: html, data:
I have the following code: $(document).ready(function(){ $.ajax({ url: svc/GetTweetsByUser.php, type: POST, success: function(data) {
I have following ajax call: $(#container).html(loading...); $.ajax({ url: somedoc.php, type: POST, dataType: html, success:
I have the following code: $.ajax({ url: some-page.aspx, type: POST, data: {fileName: file, param02:
I have the following code: jQuery: $.ajax({ url: '/personcontroller/getperson', cache: false, type: POST, data:
I have the following ajax serialize: $.ajax({ type: POST, url: $form.attr('action'), data: $form.serialize(), error:
I have the following simple jquery snippet $(document).ready(function () { $.ajax({ url:myjson.json, dataType: 'json',
I have the following js code: var ret; $.ajax({ type: 'GET', url: '/Pay/Build64/', dataType:
I have the following code: $.ajax({ type: GET, url: AJAX.ashx?job=fetch_calendar, dataType: html, success: function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.