I have users defined as such;
const initUsers = {
'[email protected]':{
firstName: 'A',
lastName: 'Test',
email: '[email protected]',
password: 'test',
},
'[email protected]':{
firstName: 'B',
lastName: 'Test',
email: '[email protected]',
password: 'test',
}
};
I am able to retrieve a user by doing initUser['[email protected]']
. How do I delete the users based on their key which is the email like [email protected]
? Or how do I replace it with another key, for example, [email protected]
in place of [email protected]
?
Thank you. (JavaScript Beginner)