title: Convert string to JSON Object
body: <p>How do I convert string to object? I am facing this problem because I am trying to read the elements in the JSON string using "each".</p>
  
  <p>My string is given below.</p>
  
  <pre><code>jsonObj = "{"TeamList" : [{"teamid" : "1","teamname" : "Barcelona"}]}"
  </code></pre>
  
  <p>I have used <code>eval</code> and I have used </p>
  
  <pre><code>var obj = $.parseJSON(jsonObj);
  </code></pre>
  
  <p>And i have also used</p>
  
  <pre><code>var obj= eval("(" + jsonObj + ")");
  </code></pre>
  
  <p>But it comes null all the time</p>