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

203
Vistas
How to access URL inside of a JSON API that leads to another JSON API, and display that information on a page in React?

I have a property of 'inspection-link' that has a value of a URL that I'm pulling in from a JSON API.

"inspection-link": "https://qa.toromont.ca/ToromontCAT/ServiceHub/PublicInfo/ecomm/inspection?sku=N001|BFEN1868620151TLI45073",

Instead of simply displaying the "inspection-link" URL onto the pay, I need to be able to access the URL, and then display that information on the page.

The code I have below (<p>{jsonDataProduct?.["inspection-link"]}</p>) only displays the URL on the page in text, but of course I need to display that URL's data coming in from it's on JSON URL.

const PeriodicAnnualInspectionReport = ({
  lang,
  jsonDataProduct,
}: Props_PIReport) => {
  return (
    <div className="container">
      <div className="row">
        <div className="col-lg-12">
          {}
          <h2>
            {outputEnFr(
              "Periodic Annual Inspection Report",
              "Rapport d'inspection annuel périodique",
              lang
            )}
          </h2>
          <p>{jsonDataProduct?.["inspection-link"]}</p>
        </div>
      </div>
    </div>
  );
};

export default PeriodicAnnualInspectionReport;
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Then in the component mount using useEffect with empty array dependencies, and fetch the data from that URL, and set a state for it to update the UI, when data come.

const [data, setData] = useState()

useEffect(() => {
  if (jsonDataProduct) {
    fetch(jsonDataProduct["inspection-link"]).then(response => response.json())
        .then(data => setData(data));
  }
}, [])

Then you can output the data come from that json URL

about 4 years ago · Juan Pablo Isaza Denunciar
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