Created
May 9, 2018 04:57
-
-
Save terrancebryant/c082628990133d5be4e5e2c934fb7e20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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