Consider the following object:
const obj = {a: 1, b: 2, c: 3, d: 4, e: 5}
Is there a simple syntax for creating a new object that contains:
const obj2 = {a, b, d}
I'm aware that underscore & lodash have .pick()
, but I'm hoping there's some kind of destructuring trickery that I may not be aware of.