I have this array of users.
users = [
{id:"1", name:"Akash", email: "[email protected]"},
{id:"2", name:"Akshay", email: "[email protected]"}
]
I want to transform this array into an object like this.
users = {
"1" : {id:"1", name:"Akash", email: "[email protected]"},
"2" : {id:"2", name:"Akshay", email: "[email protected]"}
}
I am using node js.