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

300
Vistas
Fetch local data : How to fetch by objects's names

Today, i was doing a really cool project from frontendMentors, a planets website ! We have to do a 8 pages website (each page contains one planet details), we have the choice between writing every planet data directly in the HTML code, or, we can use a local data.JSON to manage it dynamically.

But, I got a problem:

I want to dynamically, with JS and the included data.JSON, write each planet page. So, i was like "Alright, I have to fetch data.JSON, and precise what planet to fetch, like :

fetch(`./data.json/${planetTitle}`)

But it obviously doesn't work like that. So, does anyone knows how to do it ? I'll give further informations like a screen of my JS + a screen of the data.JSON file.

JSON file; script.js;

Thx in advance !

There is the solution !

html trick script trick 1

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