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

130
Views
anaconda empresa python leer json externo en HTML

Mi código python crea archivos HTML. Trabajo en Anaconda Enterprise y mi problema es que quiero leer un archivo json externo en javascript encapsulado en HTML

 message = """ <!DOCTYPE html> <html> <head> <script type="text/javascript" src="sample.json"></script> </head> <body> <p id="GFG_DOWN" style="color: green; font-size: 20px; font-weight: bold;"></p> <script> function pointe_vers_doc(clicked) { var test = document.getElementById("GFG_DOWN"); var mydata = JSON.parse(data); test.innerHTML = "Value of my json = "+mydata[0]; } </script> </body> </html> """

Aquí está el json externo (sample.json) que quiero leer:

 data='[["first", "second"], [], ["fourth"], [], [], ["seventh"]]'

Localmente funciona pero en el servidor (AE) creo que no encuentra la ruta a sample.json Intenté cambiar la ruta varias veces probando pero no funciona. ¿Hay otra forma de proceder?

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!