Convert string to JSON Object

前端 未结 7 1577
梦如初夏
梦如初夏 2020-12-09 01:57

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.

相关标签:
7条回答
  • 2020-12-09 02:48

    Combining Saurabh Chandra Patel's answer with Molecular Man's observation, you should have something like this:

    JSON.parse('{"TeamList" : [{"teamid" : "1","teamname" : "Barcelona"}]}');
    
    0 讨论(0)
提交回复
热议问题