KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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. jsonObj = "{"TeamList" : [{"teamid" : "1","teamname" : "Barcelona"}]}" I have used eval and I have used var obj = $.parseJSON(jsonObj); And i have also used var obj= eval("(" + jsonObj + ")"); But it comes null all the time
Tags (comma-separated)
Save Edits
Cancel