title: Reactjs req.body shows [object Object]
body: <p>i have a http put function in ReactJs that looks like this </p>
  
  <pre><code>UpdateItem: function(_id) {
        var input = this.refs.myInput;
          $.ajax({
    url: 'http://localhost:3000/update/' + _id,
    type: 'PUT',
    data:input,
    cache: false,
    success: function(result) {
      console.log(data);
        window.location.reload();
    }
  });
            }
  </code></pre>
  
  <p>it takes an input and it should send the new value with the request but the it never does </p>
  
  <pre><code>&lt;input ref="myInput" type="number" name="quantity" min="1" max="10" defaultValue={item.quantity}  className="form-control"/&gt;
  </code></pre>
  
  <p>when i look at the console the req.body shows this [object Object] and my put function in node looks like this </p>
  
  <pre><code>app.put('/update/:_id', function(req, res) {
        console.log(req.params);
        console.log("your req is" +req.body);
        Cart.findByIdAndUpdate(req.params.id, { quantity: req.body.quantity }, function(err, product) {
    if (err) throw err;
    console.log(product);
  
    console.log(product);
  });
       });
  </code></pre>
  
  <p>any ideas of what the problem could be ?</p>