I am looking to extract a specific subset of values from an object in a specific order.
const obj = { a: 1, b: 2, c: 3, d: 4 };
const values = extractValues(obj, ['a', 'd']);
// extracted values [1, 4]
While I can create my own extractValues
function, I'm curious if there is already a more concise solution available in JavaScript vanilla or Lodash.