How to access value of userPass from array of object using angular 7?
I need to access Property userPass value from array of object
I have variable type any his name auth
auth have array of object
I need to access property value of userpass from json below
var auth;
auth =
[{"userLoginID":0,"userName":"test","userMail":"[email protected]","userPass":"12345678","fkTeamID":0
,"isAdmin":false,"createdBy":0,"createdDate":"0001-01-01T00:00:00","isHidden":false}]
I need to access userPass value meaning i need to access 12345678
what i try is
ngOnInit() {
auth.forEach(element => {
element.forEach(au => {
console.log(au.userPass);
});
});
userpathvalue=???
}
Meaning i need to access value 12345678