@wire(ApiRequest, { ticker: '$param' })
                stockInfo({error, data}) {
                    if (data) {
                        this.stockData = JSON.parse(data);

                        let years = this.stockData.earnings.financialsChart.yearly.length;

                        this.fullTime_Employees = JSON.stringify(this.stockData.summaryProfile.fullTimeEmployees);

                        const profitData = JSON.stringify(this.stockData.financialData.profitMargins.fmt)
                        this.profit_Margins = profitData.replace(/"/g,"");
//                        console.log(this.stockData.financialData.profitMargins.fmt);

                        const recentQ = JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].date)+ ':  $' + JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].revenue.fmt);
                        this.recent_Quarter = recentQ.replace(/"/g,"");
//                        console.log('%% Recent Quarter Revenue %% '+JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].date)+ '  $' + JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].revenue.fmt));

                        const yearRevenue = JSON.stringify(this.stockData.earnings.financialsChart.yearly[years-1].revenue.fmt);
                        this.yearly_Revenue = yearRevenue.replace(/"/g,"");
//                       console.log('%% Annual Revenue %% '+ (this.stockData.earnings.financialsChart.yearly[years-1].revenue.fmt));

                        const yearEarnings = JSON.stringify(this.stockData.earnings.financialsChart.yearly[years-1].earnings.fmt);
                        this.yearly_Earnings = yearEarnings.replace(/"/g,"");
//                        console.log('%% Annual Earnings %% '+ (this.stockData.earnings.financialsChart.yearly[years-1].earnings.fmt));
                        this.error = undefined;
                    } else if (error) {
                        this.error = error;
                        this.stockData = undefined;
                    }
                }
// Call  Apex Method RapidApiCallout.ApiRequest with Ticker Symbol as param
Call  Apex Method RapidApiCallout.ApiRequest with Ticker Symbol as param
Call Apex Method RapidApiCallout . ApiRequest with Ticker Symbol as param
@wire(ApiRequest, { ticker: '$param' })
                stockInfo({error, data}) {
                    if (data) {
                        this.stockData = JSON.parse(data);
                        let years = this.stockData.earnings.financialsChart.yearly.length;
                        this.fullTime_Employees = JSON.stringify(this.stockData.summaryProfile.fullTimeEmployees);
                        const profitData = JSON.stringify(this.stockData.financialData.profitMargins.fmt)
                        this.profit_Margins = profitData.replace(/"/g,"");
                        const recentQ = JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].date)+ ':  $' + JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].revenue.fmt);
                        this.recent_Quarter = recentQ.replace(/"/g,"");
                        const yearRevenue = JSON.stringify(this.stockData.earnings.financialsChart.yearly[years-1].revenue.fmt);
                        this.yearly_Revenue = yearRevenue.replace(/"/g,"");
                        const yearEarnings = JSON.stringify(this.stockData.earnings.financialsChart.yearly[years-1].earnings.fmt);
                        this.yearly_Earnings = yearEarnings.replace(/"/g,"");
                        this.error = undefined;
                    } else if (error) {
                        this.error = error;
                        this.stockData = undefined;
                    }
                }
@ wire ( ApiRequest , { ticker : '$param' } ) stockInfo ( { error , data } ) { if ( data ) { this . stockData = JSON . parse ( data ) ; let years = this . stockData . earnings . financialsChart . yearly . length ; this . fullTime_Employees = JSON . stringify ( this . stockData . summaryProfile . fullTimeEmployees ) ; const profitData = JSON . stringify ( this . stockData . financialData . profitMargins . fmt ) this . profit_Margins = profitData . replace ( / " / g , "" ) ; const recentQ = JSON . stringify ( this . stockData . earnings . financialsChart . quarterly [ 3 ] . date ) + ':  $' + JSON . stringify ( this . stockData . earnings . financialsChart . quarterly [ 3 ] . revenue . fmt ) ; this . recent_Quarter = recentQ . replace ( / " / g , "" ) ; const yearRevenue = JSON . stringify ( this . stockData . earnings . financialsChart . yearly [ years - 1 ] . revenue . fmt ) ; this . yearly_Revenue = yearRevenue . replace ( / " / g , "" ) ; const yearEarnings = JSON . stringify ( this . stockData . earnings . financialsChart . yearly [ years - 1 ] . earnings . fmt ) ; this . yearly_Earnings = yearEarnings . replace ( / " / g , "" ) ; this . error = undefined ; } else if ( error ) { this . error = error ; this . stockData = undefined ; } }
Call  Apex Method RapidApiCallout.ApiRequest with Ticker Symbol as param
Call Apex Method RapidApiCallout . ApiRequest with Ticker Symbol as param
//                        console.log(this.stockData.financialData.profitMargins.fmt); //                        console.log('%% Recent Quarter Revenue %% '+JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].date)+ '  $' + JSON.stringify(this.stockData.earnings.financialsChart.quarterly[3].revenue.fmt)); //                       console.log('%% Annual Revenue %% '+ (this.stockData.earnings.financialsChart.yearly[years-1].revenue.fmt)); //                        console.log('%% Annual Earnings %% '+ (this.stockData.earnings.financialsChart.yearly[years-1].earnings.fmt));