Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

240
Vistas
Trouble importing json file to .js file

I have a simple javascript file that's meant to fetch an object as a json file and display it in the console:

javascript code

When I run the page on my app, I get these error messages:

errors

As far as I can tell, my directories are set up fine and I don't think there are any typos in the code. I think the problem has something to do with not being able to find the json file. I've even tried putting the json file in the same folder as main.js but this hasn't worked either. This is how my directory is laid out anyway in case the error has something to do with that:

Directories

I'm making an app using Flask and ultimately want to be able to store the json object in a js variable so I can use d3 to make tree graphs with it.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda