Let's say I have a state variable like :

```
const [params,setParams] = useState({name:'bill' , surname:'mysurname'});

```

I want to create a function that gets a string as an input . If the string is a value of one of my object's keys then set the object key value to "" .

Example

```
  input = "bill" 
   if "bill" is a value of a key in my object then set the corresponding key's value to "" 
   I have input= " bill" and name:"bill" so set name:""

```

I want to do this using setParams of course . I would appreciate your help .