Sorry, it is probably quite trivial, still I can't find a solution for:
I have an object that contains the following elements:
0: "A"
1: "B"
2: "C"
I would like to use the map() function to convert it to something like this:
0: {name: "A"}
1: {name: "B"}
2: {name: "C"}
If I use this:
this.xxx = this.operations.map(obj => obj.name);
console.log(this.xxx);
or this:
this.xxx = this.operations.map(obj => {name:obj} );
console.log(this.xxx);
the elements of xxx are undefined.