In C# if I had a list for example of 3 ints [1,2,3]
, I could trasform that list into another with .Select
in following way [1,2,3].Select(e => new { Id = e, Name = $"name:{e}")
, which would return new array with 3 objects.
how can I get the same result in js without using for loop?