Javascript converting a string variable
<p>I got this:</p>

<pre><code>var a = "slices: {0: {color: '#ffffff'}, 1: {color: '#fffff0'}, 2: {color: '#fff000'},3: {color: '#ff0000'}, 4: {color: '#f00000'}}";
</code></pre>

<p>You can see it's a string variable</p>

<p>I need this</p>

<pre><code>draw(data, {slices: {0: {color: '#ffffff'}, 1: {color: '#fffff0'}, 2: {color: '#fff000'},3: {color: '#ff0000'}, 4: {color: '#f00000'}}, is3D: true});
</code></pre>

<p>As you see I need to give the variable without being a string, I tried doing </p>

<pre><code>eval( "slices: {0: {color: '#ffffff'}, 1: {color: '#fffff0'}, 2: {color: '#fff000'},3: {color: '#ff0000'}, 4: {color: '#f00000'}}");
</code></pre>

<p>but didn't work and I cannot do this</p>

<pre><code>draw(data, {a, is3D: true});
</code></pre>

<p>Thanks for your time.</p>
