我有一個對象(JAR),其中包含本(由執行console.log):問題與對象JSON轉換
{ _jar: { store: { idx: { localhost: { '/': { PHPSESSID: Cookie="PHPSESSID=pe1952pk023e7b6d7t9am3kse0; Path=/; hostOnly=true; aAge=18ms; cAge=97ms" } } } } } }
我試圖將其存儲到MongoDB實例這是確定的,但加載後它從那裏,它是一種畸形。這模擬它:
console.log(JSON.parse(JSON.stringify(jar)));
以上輸出這樣的:
{ _jar: { store: { idx: [Object] } } }
因此,所有的突然 'localhost' 的部分得到了消失在 '對象'?如何防止這一點?