I have a datatable/datagrid that is printing a list of data through an array of objects with different values. How do I target a specific object or in this case column and change its rows value from true/false to asterisk ***** to hide from the user.
Array as shown in console with objects and values
const [userList, setUserList]=useState([]);
useEffect(()=> {
createAPIEndpoints(ENDPOINTS.USERLIST).fetchAll().then(res =>{
setUserList(res.data);
})
.catch(err => console.log(err))},[]);
return (
<div style={{ height: 600, width: '85%',marginLeft:"30vh"}}>
<DataGrid
rows={userList}
columns={newuserList}
pageSize={10}
rowsPerPageOptions={[10]}
checkboxSelection
/>
<div>
This is the code that I'm using to fetch a list of user accounts and storing its values in a material ui Datagrid row. I want to target a specific key and its values for example 'passwordIsChanged' and replace its values from true/false to asterisk ****. Any ideas? As shown in the image.