I have an object with some properties. I would like to extract a few well-know properties, skipping over any that are not present.
Something like this:
let x = {a: 1, b: 2, c: 3};
let y = take a, b, d from x; // Not real JS!
With y
now looking like this:
{a: 1, b: 2} // Note that d is missing!
Is there an operator or method that does this?