If I have a JavaScript array including 10 objects with the following syntax:
const myArray = [{Age: 10, Name: Justin}, {Age: 15, Name: Bob}, ..., {Age: 20, Name: Jon}];
What's the most efficient way to update the Name key to be DisplayName. This is my currently logic:
myArray = myArray.map(item=>{return {age:item.age, displayName:item.name }});