En C#, puedo hacer lo siguiente:
class Item { public string Name { get; set; } public string Email { get; set; } public string Phone { get; set; } } Item[] Items = new[] { new() { Name = "Bob", Email = "Bob@domain.com", Phone = "555-5555" }, new() { Name = "Carl", Email = "Carl@domain.com", Phone = "555-5555" }, new() { Name = "Ted", Email = "Ted@domain.com", Phone = "555-5555" }, }; IEnumerable<string> names = Items.Select(i => i.Name);
La última línea crea una colección de solo los nombres de los Items
("Bob", "Carl" y "Ted").
¿Hay alguna manera de hacer lo mismo en JavaScript sin escribir un bucle y construir la matriz usted mismo?