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

228
Vistas
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'log') at eval (lwcCallOut.js:1:2652)

In console debug Unable to display objData details? I am using fetch() method to get details from external services. Getting error in console Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'log') at eval (lwcCallOut.js:1:2652)

js File >>>>

handleClick() {

  fetch('https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=' + this.FromCurrencyValue +
      '&to_currency=' + this.ToCurrencyValue + '&apikey=T8P8FQ9JP56SWT0L', {
        method: "GET",
        headers: {
          "Content-type": "application/json",
          "Authorization": "OAuth 00D5g00000EIV0z!AR8AQFf0J3ZQF9HU3TOcJGd1o3Nj6oLj6bQyJX0wgs2rwubv90cBy4ZX4fZJb0c07lCKmLEcnV4EsRUexzRf31mTEaFVf6Tr"
        }
      })
    .then((response) => {
      return response.json();
    })
    .then((jsonResponse) => {

      let objData = {
        From_Currency_Name: '',
        From_Currency_Code: '',
        To_Currency_Name: '',
        To_Currency_Code: '',
        Last_RefreshId: '',
        Exchange_Rate: '',
      };

      window.console.log('Get JSON Response is >>>' + JSON.stringify(jsonResponse));
      let exchangeData = jsonResponse['Realtime Currency Exchange Rate'];
      console.log('exchangeData >>>>>' + JSON.stringify(exchangeData));

      objData.From_Currency_Name = exchangeData['1. From_Currency Code'];
      objData.From_Currency_Code = exchangeData['2. From_Currency Name'];
      objData.To_Currency_Name = exchangeData['4. To_Currency Name'];
      objData.To_Currency_Code = exchangeData['3. To_Currency Code'];
      objData.Exchange_Rate = exchangeData['5. Exchange Rate'];
      objData.Last_RefreshId = exchangeData['6. Last Refreshed'];

      Window.console.log("objData >>>>>>" + JSON.stringify(objData));
    })

}
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