Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Javascript parse JSON into table html

I' m trying to display datas from json into a table in html. SO far I have the following.

  • I need help to parse the data in dom

  • at the moment I can't display the datas properly. Specially the

    "1day": { "movement": 0.28, "price": null }

function readTextFile(file, callback) {
  var rawFile = new XMLHttpRequest();
  rawFile.overrideMimeType("application/json");
  rawFile.open("GET", file, true);
  rawFile.onreadystatechange = function() {
    if (rawFile.readyState === 4 && rawFile.status == "200") {
      callback(rawFile.responseText);
    }
  };
  rawFile.send(null);
}

//usage:
readTextFile("popular-feed.json", function(text) {
  var data = JSON.parse(text);
  //console.log(data);

  //SEE HERE

  var obj = JSON.parse(text, function(key, value) {
    console.log(key[1]);
    console.log(value);
  });
});
<div id="name"></div>
<div id="code"></div>
<div id="spread"></div>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!