title: How to send data to an api having multiple Nested Arrays in react
body: <p>I have to send the modified data to an api which has json format as below:</p>
  
  <pre><code>{
  "Customer": {
      "name": "ABC",
      "email": ABC@gmail.com,
      "password": ""
  },
  "access": true,
  "time": 2000
  }
  </code></pre>
  
  <p>On save I want to set the respective state to api fields.</p>
  
  <pre><code>save=()=&gt;{
      let newCustomer={
          access:this.state.access,
          time:this.state.time,
          name:      //How can i set the state values for name,email and 
                       password which is in nested form?
          email:
          password:
  
      }
       return axios.put('api',newCustomer)
       .then(response =&gt; {
  
      })
  }
  </code></pre>