Hi there i have this starting array:
names = [ '1A', '1B', '1C', '1D', '1E'];
which I need for later on in my application to see who's turn it is. I need to be able to store some values in a different kind of array like so:
scores = [
{
id: "1A",
endScores: {}
},
{
id: "1B",
endScores: {}
},
{
id: "1C",
endScores: {}
},
{
id: "1D",
endScores: {}
},
{
id: "1E",
endScores: {}
}
];
How is it possible to get from my first array to the second array? The first array can also change in its size there can be more or less names in there... Hope there is a possible way. PS: I'm using Angular 2.