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

235
Views
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
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!