$scope.login = function () {
var userLogin = JSON.parse(localStorage.getItem('userData'));
userLog = (userLogin.Name)
console.log(userLogin);
}
this is in my browser localstorage
[{" Name":"Admin","EmailId":"[email protected]","password":"Admin","PhoneNo":"9765432108"},{"Name":"testuser2","EmailId":"[email protected]","password":"testing","PhoneNo":9871324560},{"Name":"test11","EmailId":"[email protected]","password":"test","PhoneNo":9632196321}]
From the console i got the output as,
0: Object { " Name": "Admin", EmailId: "[email protected]", password: "Admin", … }
but i want to that name and password field in the separate variable
$scope.login = function () {