Convert string into key/value pairs for $.post()
<p>I want to have the same result as this line of code:</p>

<pre><code> $.post("test.php", { name: "John", time: "2pm" } );
</code></pre>

<p>How do I convert a string variable</p>

<pre><code> var str = '{ name: "John", time: "2pm" }';
</code></pre>

<p>into key/value pairs so that I can send the POST request using this line of code:</p>

<pre><code> $.post("test.php", str );
</code></pre>

<p>Thanks!</p>
