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

278
Views
Visualización de múltiples fuentes JSON en la tabla HTML

Me gustaría mostrar varios feeds JSON en una tabla HTML. Con una fuente, mi código funciona bien. Pero, ¿cómo puedo cargar varios feeds en mi mesa?

También me gustaría saber dónde puedo insertar etiquetas para tener un encabezado de tabla después de generar la tabla.

Mi código:

 <body> <section> <h1>Big Flower profit calculator</h1> <script> $(document).ready(function () { var proxy = "https://api.allorigins.win/get?url="; var MyURL1 = "https://whattomine.com/coins/151.json?hr=505.0&p=1800.0&fee=0.0&cost=0.12&hcost=0.0&span_br=1h&span_d=24"; var MyURL2 = "https://whattomine.com/coins/321.json?hr=2100.0&p=430.0&fee=0.0&cost=0.12&hcost=0.0&span_br=1h&span_d=24"; var MyURL3 = "https://whattomine.com/coins/334.json?hr=3200.0&p=410.0&fee=0.0&cost=0.12&hcost=0.0&span_br=&span_d=24"; var MyURL4 = "https://whattomine.com/coins/164.json?hr=350.0&p=324.0&fee=0.0&cost=0.12&hcost=0.0&span_br=&span_d=24"; let list = []; var res = ''; var table = $("<table id=DynamicTable border=1></table>").appendTo("#ResultArea"); // FETCHING DATA FROM JSON FILE $.getJSON(proxy + MyURL1, function (data) { console.log(data); var adat = data.contents; console.log(adat); // CONVERT JSON res = JSON.parse(data.contents) list.push(res); console.log(list); $.each(list, function (i, value) { //Create new row for each record var row = $("<tr></tr>").appendTo(table); $("<td></td>").text(value.tag).appendTo(row); $("<td></td>").text(value.difficulty).appendTo(row); $("<td></td>").text(value.difficulty24).appendTo(row); $("<td></td>").text(value.revenue).appendTo(row); $("<td></td>").text(value.cost).appendTo(row); $("<td></td>").text(value.profit).appendTo(row); }); }); }); </script> </section> <div id="ResultArea"></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!