The example in this article describes the implementation method of converting JS objects and json string formats, and shares it with everyone for your reference. The specific implementation method is as follows: Copy code The code is as follows: <br> var obj = new Object();<br> obj.Name = "Bajie"<br> obj.Age = 500; <p> //Define objects in the form of literals<br> var obj1 = { "Name": "Bajie", "Age": "500" };<br> var arr = [{ "Name": "Bajie", "Age": "500" }, { "Name": "Bajie1", "Age": "1000" }];</p> <p> //JSON format: Store the literal representation of json as a string, then it is a json format string <br> var str = '{ "Name": "Bajie", "Age": "500" }';<br> var jsonstrarr = '[{ "Name": "Bajie", "Age": "500" }, { "Name": "Bajie1", "Age": "1000" }];';<br> <br> //Convert json string into js object (array) <br> var resobj = JSON.parse(str);<br> alert(resobj.Name);</p> <p>