title: Axios PUT request -React
body: <p>I want to send a put request to modify the command part of my JSON file. Here is my JSON;</p>
  <pre><code>{
    &quot;users&quot;: [
      {
        &quot;hostname&quot;: &quot;xxx.xxx.xxx.xx&quot;,
        &quot;password&quot;: &quot;password1&quot;,
        &quot;command&quot;: &quot;command1&quot;,
        &quot;id&quot;: 1
      },
      {
        &quot;hostname&quot;: &quot;xxx.xxx.xxx.xx&quot;,
        &quot;password&quot;: &quot;password2&quot;,
        &quot;command&quot;: &quot;command2&quot;,
        &quot;id&quot;: 2
      },
      {
        &quot;hostname&quot;: &quot;xxx.xx.xx.xxx&quot;,
        &quot;password&quot;: &quot;password3&quot;,
        &quot;command&quot;: &quot;command3&quot;,
        &quot;id&quot;: 3
      }
    ]
  }
  </code></pre>
  <p>In App.js I send put request like this;</p>
  <pre><code>stopPC(id){        
              axios.put('http://localhost:3002/users/'+id,{
                command: 'stop'
              })   
    }
  </code></pre>
  <p>And I have tried this;</p>
  <pre><code>axios({
              method: 'put',
              url: 'http://localhost:3002/users/'+ id,
              data: {
                hostname: id.hostname,
                password: id.password,
                command:  'stop'
              }    
    });
  </code></pre>
  <p>In both, I got the following output in the JSON file.</p>
  <pre><code>{
    &quot;users&quot;: [
      {
        &quot;command&quot;: &quot;stop&quot;,
        &quot;id&quot;: 1
      },
      {
        &quot;hostname&quot;: &quot;xxx.xxx.xxx.xx&quot;,
        &quot;password&quot;: &quot;password2&quot;,
        &quot;command&quot;: &quot;command2&quot;,
        &quot;id&quot;: 2
      },
      {
        &quot;hostname&quot;: &quot;xxx.xxx.xxx.xx&quot;,
        &quot;password&quot;: &quot;password3&quot;,
        &quot;command&quot;: &quot;command3&quot;,
        &quot;id&quot;: 3
      }
    ]
  }
  </code></pre>
  <p>I want to change only the command information while keeping the hostname and password information the same.
  I'm not sure where I went wrong, I'd be glad if you could help.</p>