I have an object which I am forming with all the input values from a form. I want to go through the object and change all the input value to lowercase before I make a post request to the backend. I want to write a function that takes that object and returns a new object with lowercase value
const obj = {name: 'Test', city: 'London'}
const modifiedObj = myFunction(obj)
modifiedObj
should be:
{name: 'test', city: 'london'}