Struggling to assign the current user from my list
Here is my array after submitting the form
[{"name":"Erich","surname":"Josh","email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="096c67497a7a276a6664">[email protected]</a>","age":"22","tel":"32423432432"}]
Function for setting the current user
$scope.currentUser = null;
$scope.setCurrentUser = function(name) {
$scope.currentUser = $scope.users[name];
};
I am trying to click on a name and then display all information about that user, but I am having trouble selecting the current user.
What mistake am I making?