title: Use String as object in javascript?
body: <p>Here I am dynamically getting a string like this:</p>
  
  <pre><code>  var datN="{y:12 ,marker: {symbol: 'url(http://abc.com//1446/t_23718.gif)'}},72.72727,83.333336";
  </code></pre>
  
  <p>I want to use it in HighChart api as graph data but this is not working. I have tried and got this that if the code was like this it would work:</p>
  
  <pre><code>  var datN=[{y:12 ,marker: {symbol: 'url(http://abc.com//1446/t_23718.gif)'}},72.72727,83.333336];
  </code></pre>
  
  <p>so how can I convert the first variable to work like the second one? I am new to javascript please help?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>All I want is to convert the first string to object like second one (Second one is working correctly) . I have already tries JSON.parse and eval but they didnt work. So please help?</p>