I have an array of objects like the following:
employees = [
{name: "Tony Stark", department: "IT"},
{name: "Peter Parker", department: "Pizza Delivery"},
{name: "Bruce Wayne", department: "IT"},
{name: "Clark Kent", department: "Editing"}
];
I am looking to filter the array of objects to display only the names:
employees = [
{name: "Tony Stark"},
{name: "Peter Parker"},
{name: "Bruce Wayne"},
{name: "Clark Kent"}
];