post data using curl command
<p>I have tried posting data in curl using this command: </p>

<pre><code>curl -X POST http://x.x.x.x:1111/send --data [{'virtual':'5555'}]
</code></pre>

<p>Then I am getting a response in node like this:</p>

<pre><code>{ '{virtual:5555}': '' } 
</code></pre>

<p>How to convert this to array? I have tried <code>JSON.parse()</code> and <code>JSON.stringify()</code> but I get an <code>Unexpected token o</code> error as result.</p>

<p>Any idea how to post the json data in curl command?
I also tried with:</p>

<pre><code>curl ... -H "Accept: application/json" -H "Content-Type: application/json"
</code></pre>