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\".
My string is given below.
Combining Saurabh Chandra Patel's answer with Molecular Man's observation, you should have something like this:
JSON.parse('{"TeamList" : [{"teamid" : "1","teamname" : "Barcelona"}]}');