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.
Quick answer, this eval work:
eval('var obj = {"TeamList" : [{"teamid" : "1","teamname" : "Barcelona"}]}')