How to filter index value in foreach Javascript with condition if
last_login = null
then store the filtered values to
this.searchLogin
Image below is the ouput of: console.log(obj);
Here' what I've done so far:
try {
this.searchTrigger = true
var obj = this.list;
this.searchLogin = [];
for (let i=0; i < obj.length; ++i){
if(obj.filter( x => obj[i].profile.last_login === null)){
this.searchLogin.push(obj[i]);
}
}
console.log('This are obj data passed to search login',this.searchLogin);

searchLoginto contain the object orobj[i].profile.last_login?if profile.last_login = null