I want to transform this to an array of values ordered based on an array of keys:
{
tom: 1,
jim: 2,
jay: 3
}
Input -> Output examples:
['jim', 'tom', 'jay'] -> [2, 1, 3]
['jay', 'tom', 'jim'] -> [3, 1, 2]
How can I accomplish this? I'd rather a one line lodash solution.