Example:
import { chain, mapKeys, mapValues } from 'lodash';
chain(input).mapKeys(...).mapValues(...).value();
mapValues(mapKeys(input, ...), ...);
The usage is not intuitive, and it is preferable to use Object.fromEntries() in this scenario. The similar case is .keyBy(...).mapValues(...)
const input = [
{ k: 'key1', v: 'value1' },
{ k: 'key2', v: 'value2' },
];
// this `mapKeys().mapValues()` call
chain(input).mapKeys('k').mapValues('v').value();
// equals
Object.fromEntries(input.map((item) => [item.k, item.v]));
// equals
{
key1: 'value1',
key2: 'value2',
}