Within my angular application, I successfully retrieved the data from the server in JSON format. Here is an example of the JSON data:
jsondata = {
Id: 16531914,
EmailId: "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e9888b8aa98e84888085c78a8684">[email protected]</a>"
}
My task is to check if 'jsondata' coming from the server contains the 'Id' field. If it does, then I need to redirect to the dashboard page; otherwise, I should navigate to the login page.