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 8629579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:50:46+00:00 2026-06-12T08:50:46+00:00

I have this structure: HTML part: <table id=table_div class=table table-striped table-condensed><tbody></tbody></table> JS part: var

  • 0

I have this structure:

HTML part:

<table id="table_div" class="table table-striped table-condensed"><tbody></tbody></table>

JS part:

var data = json_response['data'];

  $("#table_div").html('<thead><tr><td>TIMESTAMP</td><td>VALUE</td></tr></thead>');

  $.each(data, function(index, value) {
    $('#table_div > tbody:last').append('<tr><td>' + value + '<td></tr>'); 
  });   

Now, my vector data, taken from the java console, is this for example:

{"data": [[1348754599, 0.0], [1348754639, 0.0], [1348754680, 0.0], [1348754721, 0.0], [1348754761, 0.0], [1348754802, 0.0], [1348754842, 0.0], [1348754883, 0.0], [1348754924, 0.0], [1348754964, 0.0], [1348755005, 0.0], [1348755045, 0.0], [1348755086, 0.0], [1348755126, 0.0], [1348755167, 0.0], [1348755208, 0.0]]}

And at this moment the result is that the timestamp and the value are toghether under TIMESTAMP, but column VALUE is empty.

TIMESTAMP   VALUE

1348756790,0
1348756830,0
1348756871,0
1348756911,0
1348756952,0
1348756992,0
1348757033,0

How I can i do to have

Timestamp Value
12876      0
129487     1

Thank you very much!

*EDIT*

This is the html generated now:

<table id="table_div" class="table table-striped table-condensed"><tbody><tr><td>TIMESTAMP</td><td>VALUE</td></tr><tr><td>1348760408,0</td><td></td></tr><tr><td>1348760448,0</td><td></td></tr></tbody></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-06-12T08:50:47+00:00Added an answer on June 12, 2026 at 8:50 am

    My previous answer was bogus. I misremembered how $.each() works.

    Your original code is correct except that you’re not breaking each element part into its timestamp and value components. I think this code will do what you want:

      $("#table_div").html('<thead><tr><td>TIMESTAMP</td><td>VALUE</td></tr></thead>');
    
      $.each(data, function(index, value) {
        $('#table_div > tbody:last').append('<tr><td>' + value[0] + '</td><td>' + value[1] +'</td></tr>'); 
      });  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this table, structured in this way: Html part: <table id=table_div class=table table-striped
I have this HTML structure <div class=buttons> <button data-icon=ui-icon-disk class=save>Save1</button> <button data-icon=ui-icon-check class=ok>OK1</button> <button
So i have this structure html <span class=label data=data/support_icon.png> <span class=title>1 User/Location - 8Am
I have this HTML structure: <p id=lorem> <span class=part id=n01>L</span><span class=part id=n02>o</span><span class=part id=n03>r</span><span
I have this HTML structure (excerpt): <td> <select id=test1 class=pub_chooser> <option value=99>All Publications</option> <option
I have this html structure <div class=top_menu> <ul> <li class=left><a href= class=family-filter>asdas</a></li> <li class=welcome>Welcome
Assuming I have this HTML structure: <ul class='menu'> <li> <div></div> <div> <div></div> <div> <a
i have this following html structure usilg ul and li. <ul class=treeview id=productTree> <li
i have this basic html structure: <div class=a> <div class=m></div> <div class=m></div> </div> <div
I have this structure in my html document: <p> <em>You</em> began the evening well,

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.