I want to ask simple question, how to add object name using javascript
I have try this
const data = ["1", "5", "3", "4"]
const obj = this.Tags.reduce((acc,e) => { acc[e] = e; return acc; }, {});
but the output, I need to change number with string name
{
1: "1",
3: "3",
4: "4",
5: "5"
}
I want the output to be like this, how to do that in javascript ?
{
value: "1",
value: "3",
value: "4",
value: "5"
}
Thanks