'I have trying to update my quantity in mongodb server Its showing Null. How Can I solve this?

##I have trying to update my quantity in mongodb server Its showing Null. How Can I solve this?##

```
const handleSubmit = event =>{
    const inputQuantity = event.target.quantity.value;
    const updatingQuantity = {inputQuantity};
    const url = `http://localhost:5000/product/${inventoryId}`
    fetch(url, {
        method: 'PUT',
        headers: {
            'content-type': 'application/json',
        },
        body: JSON.stringify(updatingQuantity)
    })
    .then(res => res.json())
    .then(data => {
        console.log('success', data);
    })
}
```


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source