title: How to send nested params to axios and receive on server
body: <p>How can i send a nested obj of params to axios and receive them on the server side?</p>
  <pre><code>const params = JSON.stringify({
    sizes: {
      thumb: [400, 400],
      banner: [1280, 400],
    },
  });
  const res = await api({
    method: &quot;POST&quot;,
    url: &quot;http://localhost:3000/v1/api/create&quot;,
    params: params,
  });
  </code></pre>
  <p>On the express server i have</p>
  <p><strong>create.js</strong></p>
  <pre><code>module.exports = async function (req, res) {
  ...
  console.log(req.query)
  console.log(JSON.parse(req.query))
  }
  </code></pre>
  <p>I get errors though</p>
  <pre><code>{ '0': '{&quot;sizes&quot;:{&quot;thumb&quot;:[400,400],&quot;banner&quot;:[1280,400]}}' }
  SyntaxError: Unexpected token o in JSON at position 1
      at JSON.parse (&lt;anonymous&gt;)
  </code></pre>
  <p>Am i passing them or receiving them incorrectly?</p>
  <p>console print of req.query</p>
  <pre><code>...
  { '0': '{&quot;sizes&quot;:{&quot;thumb&quot;:[400,400],&quot;banner&quot;:[1280,400]}}' }
  ...
  </code></pre>