Convert JSON string to JavaScript Object for iterating

This question already has an answer here:

  • Safely turning a JSON string into an object 22 answers

  • Use JSON.parse("[{...}]"); to convert it into Javascript object.


    您可以使用JSON字符串到Javascript对象的JSON.parse()方法。


    You can use:

    JSON.parse("some json stringified object")
    

    To create string from json object use:

    JSON.stringify(OBJECT);
    
    链接地址: http://www.djcxy.com/p/31716.html

    上一篇: 用纯JavaScript解析JSON

    下一篇: 将JSON字符串转换为JavaScript对象以进行迭代