Accessing JSON fields in html of LWC
That is because HTML will load before your external call finishes and Profile will be undefined before getting response and so I would suggest to use conditional rendering in HTML itself so that you can fetch the values directly instead of increasing Javascript code for implementing multiple getters.
HTML:
<template>
<template if:true={profile}>
{profile.Name.First}
{profile.Name.Last}
{profile.Email}
{profile.Phone}
</template>
</template>
As you see, there is no need of implementing 4 getters in JS
Change your template to use a getter that checks for null down the object tree
in JS
get name(){
let returnValue = '';
if(this.profile && this.profile.Name && this.profile.Name.First){
returnValue = this.profile.Name.First;
}
return returnValue;
}
in html
<template>
{name}
</template>
What's happening is you are looking for the name on profile before the browser has had a chance to make the call to the service so there is no name to get yet.
Reference: https://wipdeveloper.com/lwc-getting-data-with-the-wire-service/