I need to create a function to modify keys of object from PascalCase to camelCase format. Ie
const input = {
FirstName: 'John',
LastName: 'Smith'
};
const expectedOutput = {
firstName: 'John',
lastName: 'Smith'
};
// function looks as follows
function pascalToCamelCase<T>(input: T): CamelCaseKeys<T> {
if (typeof input !== 'object' || input === null) {
return input;
}
// do conversion....
return output;
}
But I don't know how to modify keys accordingly via CamelCaseKeys
