title: Sending json with files nested in lists with ajax
body: <p>I am developping a form with some basic inputs and a mini form (in a popup) with a list of foos and each foo have its own attachement file</p>
  
  <pre><code>{
  
      // form fields
      ...
  
      foos: [
          {
              // foo form fields
              ...
  
              attachment: { /* File type */ }
          },
          ...
      ]
  }
  </code></pre>
  
  <p>before i add the attachement property (file upload), everything work good when i submit the whole form with <code>axios</code> to the backend api server (i am using <code>redux-form</code> to manage the form state) </p>
  
  <p>I use <code>JSON.stringify(formValues)</code> to send data with <code>axios</code> as <code>json</code></p>
  
  <p>But when i add the attachement property i don't know how to send the form because i read that with the file involved in the form i can't no longer send the form as json but I have to use <code>FormData</code> </p>
  
  <p>The problem is I have nested file objects within a list so how can i send the whole form ?</p>