I am trying to access a user's details from a get Request but I cannot figure out for the life of me why the I can only log some of the response results...
Here is the request:
let user = (await Requests.GET("/user/test-user-3", accesToken3)).user;
Here is the response in the console:
{ pk: 'user#test-user-3', sk: 'user#test-user-3', entity: 'user', id: 'test-user-2', companyId: 'test-company', fName: 'Test', lName: 'User 2', email: 'test2@gmail.com', isComplete: true, weight: 80, height: 160, dob: '15/09/1998', fitnessTrackers: [], department: 'Development', location: 'USA', coins: 100, gender: 'male'}
Here is the what I log:
console.log("COINS: ", user.coins);
And I get a result of:
'COINS: ', 100
But when I try to log out the user's fname like:
console.log("Name: ", user.fname);
I get a result of undefined
I really just don't understand what the problem is here at all please help!!