I have an object. I would like to modify the object (not clone it) by removing all properties except for certain specific properties. For instance, if I started with this o
This was the first hit when googling 'js keep only certain keys' so might be worth an update.
The most 'elegant' solution might just be using underscore.js
_.pick(myObj, 'p1', 'p2', 'p100')