I'm taking an input object and returning a reduced and slightly changed object:var source = {_a: 1, b:2 , c: 3}function map(source) {  return {a: source._a, b: source.b}}map(source) // > {a: 1, b: 2}The key _a becomes a and c is dropped.This works and is clear to read.Now ES6 and ES7 is an option, I was wondering if there was another way to do it.This is what I now have:const source = {_a: 1, b:2 , c: 3}const map = ({_a, b}) => ({a: _a, b})map(source) // > {a: 1, b: 2}The source object argument is destructed and combination of a new a key and object key shorthand is used to construct a return object.Forgetting the ES6ness for a second, to compare more like-for-like:var source = {_a: 1, b:2 , c: 3}function map({_a, b}) {  return ({a: _a, b})}map(source) // > {a: 1, b: 2}How does the first object mapping compare to the last?
Selectively mapping one object to another
javascript;ecmascript 6