1 var a='{"name":"Mike","age": 100,"sex": "male"}' 2 var obj=JSON.parse(a) 3 console.log(obj, typeof obj)
1 var b={ 2 "name": "javascript", 3 "arr":[1,2,3] 4 } 5 var text=JSON.stringify(b) 6 console.log(text,typeof text)