title: Iterate an object to fill the FormData so I can update my Order to Database
body: <p>So with React I have an normal object where is filled with different kind of data, that I fetch from database, so now after I update the order in the front I want to send the new data object to the Database, and the problem is that I need to send it as Form-data because I have multipy images.</p>
  <p>So after I fetch the order I put in on React state and this is how it looks when i console log it:<a href="https://i.stack.imgur.com/Kz7vY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kz7vY.png" alt="consolelog" /></a>:</p>
  <p>So now I need to make a formData and fill with all those informations, and send to database, I'm using node for backend thoo.</p>
  <p>I've tried this until now:</p>
  <pre><code>onClick={() =&gt; {
    for (let key in data) {
      formData.append(key, data[key]);
    }
    dispatch(
      updateOrder({
        token: auth.token,
        id: order.order._id,
        body: formData,
      })
    );
  }}
  </code></pre>
  <p>But I don't know I'm getting an 500 (Internal Server Error).</p>
  <p>Update:</p>
  <p>For some reasons the formData is not showing anything when I consoled it.</p>
  <p>Here is screenshot of it:
  <a href="https://i.stack.imgur.com/sWRBM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sWRBM.png" alt="formData" /></a></p>