Skip to content

Instantly share code, notes, and snippets.

@terrancebryant
Created May 9, 2018 04:57
Show Gist options
  • Save terrancebryant/c082628990133d5be4e5e2c934fb7e20 to your computer and use it in GitHub Desktop.
Save terrancebryant/c082628990133d5be4e5e2c934fb7e20 to your computer and use it in GitHub Desktop.
et arr = [
{
firstName: 'Terrance',
lastName: 'Bryant',
officeLocation: 'San Diego',
title: 'Front End Engineer II'
},
{
firstName: 'James',
lastName: 'Bond',
officeLocation: 'San Diego',
title: 'Front End Engineer II'
},
{
firstName: 'Kobe',
lastName: 'Bryant',
officeLocation: 'San Diego',
title: 'Front End Engineer III'
},
{
firstName: 'Ace',
lastName: 'Ventura',
officeLocation: 'San Diego',
title: 'Front End Engineer II'
}
]
let publicList = arr.map((employee) => {
return {
fullName: `${employee.firstName} ${employee.lastName}`,
officeLocation: employee.officeLocation,
title: employee.title
}
});
console.log(publicList)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment