I'm having an array named userList and get it get filled by pushing some data in to it via a loop... like this
userList.push({
userProfileID : dataEntry.UserProfileID ,
isAgent : dataEntry.isAgent ,
firstName : dataEntry.firstName ,
roleNames : dataEntry.roleNames
})
and the output will be like this and 100 more records
0: Object {userProfileID: "68670", isAgent: false, firstName: "ARSDEO", roleNames:"Deo Role"}
1: Object {userProfileID: "68672", isAgent: false, firstName: "ARSBM101", roleNames:"BM Role"}
2:.......
3:.......
Here I want to remove the entry which has roleNames = 'BM role' in userList array
I tried this :
userList = userList.filter(item => userList.roleNames == 'BM Role');
but I get no record in array. Please advice...