the title says all, I would like to name a variable to a variable. Here is a small example of what I want:
let messages = [
{
name: "message1",
message: "hi, this is a message"
},
{
name: "message2",
message: "hi, this is a message too"
}
]
messages.forEach(message => {
let message_name_content_here = message //here
})
console.log(message_name_content_here.name)//here
How can I do that?