📜  json javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:58.640000             🧑  作者: Mango

代码示例6
var obj = {name: 'John', age: 20}

// to json
var json = JSON.stringify(obj);

//json to object
var obj1 = JSON.parse(json);