JSON.stringify
var obj = {
a: 1,
b: "Moji",
c: [1, 2, 3, 4],
d: {
"A": 1,
"B": 2
}
};
console.log(JSON.stringify(obj));
結果
{"a":1,"b":"Moji","c":[1,2,3,4],"d":{"A":1,"B":2}}
kinkun's blog
JSON.stringify
var obj = {
a: 1,
b: "Moji",
c: [1, 2, 3, 4],
d: {
"A": 1,
"B": 2
}
};
console.log(JSON.stringify(obj));
結果
{"a":1,"b":"Moji","c":[1,2,3,4],"d":{"A":1,"B":2}}