I have a functional component and state hooks now the thing is I want to push all the checked items into a particular array of the `e.target.name` of the useState hook

```js
const [former, setformer] = useState({        
    blocka : [],
    blockb : [],
    blockc : []
})
//This handle event I got some idea from one of stackoverflow : https://stackoverflow.com/questions/37129437/how-do-i-use-react-and-forms-to-get-an-array-of-checked-checkbox-values
const handleCheck = (e) => {
    const fieldname = e.target.name
    const options = former.fieldname
    let index
    if (e.target.checked) {
        options.push(+e.target.value)
    } else {
        index = options.indexOf(+e.target.value)
        options.splice(index, 1)
    }
    setformer({ ...former, [options]: options})
}

```

```html
<input type="checkbox" name="blocka" onChange={handleCheck} value="a" />
<input type="checkbox" name="blocka" onChange={handleCheck} value="b" />
<input type="checkbox" name="blocka" onChange={handleCheck} value="c" />

<input type="checkbox" name="blockb" onChange={handleCheck} value="d" />
<input type="checkbox" name="blockb" onChange={handleCheck} value="e" />
<input type="checkbox" name="blockb" onChange={handleCheck} value="f" />

<input type="checkbox" name="blockc" onChange={handleCheck} value="g" />
<input type="checkbox" name="blockc" onChange={handleCheck} value="h" />
<input type="checkbox" name="blockc" onChange={handleCheck} value="i" />

```

now the issue is its throwing a push is not a function
Can anyone guide me to complete this code or any changes?