So, I ran into a weird bug in javascript.
const obj1 = await chartService.callAPIConversion({ unix_timestamp: Math.floor(activity[0].createdAt.getTime() / 1000) })
console.log(obj1.usd_rate);
//THIS WORKS -> returns proper value
console.log(await (chartService.callAPIConversion({ unix_timestamp: Math.floor(activity[0].createdAt.getTime() / 1000) })).usd_rate);
//THIS DOESNOT WORK -> returns undefined
Why am I not able to get the key without using a variable?
You're not able to access it without creating a variable because your are retrieving values from a JavaScript object not an API call. Once the JS object called obj1 gets the informations related to your API call you can now access these informations threw the call of your JS object.