Is there a short syntax in ES6/7 for assigning just some selective properties of an object to another? For example I want to do this
const a = {
x: b.x,
y: b.y,
z: b.z
}
it's ok with 2-3 properties but with many more it will become redundant. How can I make it simple?
Edit: this question is not about destructuring object. I know destructuring can do the job, but it's not really shorter/more handy than the example I gave above, so that's not the thing mentioned here