There is a slight issue I am facing. The data I have looks like this: ["1112234", "S1044N", "A1041DS"]
I am interested in using Map to generate a new array, but I wish to include additional properties for each field.
Here is what I tried:
let newArray: SomeDataType= [];
newArray=data.map((articleNumber) => {});
My challenge is figuring out how to populate the new array with both the data from the old array and the properties from SomeDataType. I prefer not to use loops and stick to using map.
The new array should include the articleNumber field from the old array, along with articleName and articlePrice from newArray. However, I am uncertain about how to achieve this.
Does anyone have any suggestions?