I have an array of strings.
["A", "B", "C", "D"]
How can I add a key to the array, to make it object.
Like this, to an array on object.
[{ id: "A" }, { id: "B" }, { id: "C" }]
I tried the following:
const newArray = this.myArray.map(function(item) {
return 'id:' + item;
});
This does not work for me though.