這可能是一個noob問題,但如果我想使項目的JSON列表(在的NodeJS應用程序),我可以做到以下幾點:JSON字符串化的子列表
var myVar = {
'title' : 'My Title',
'author' : 'A Great Author'
};
console.log(JSON.stringify(myVar));
OUTPUT: { 'title' : 'My Title', 'author' : 'A Great Author' }
,一切的偉大工程,但我如何製作如下的子列表?
OUTPUT: { book {'title' : 'My Title', 'author' : 'A Great Author'} }
謝謝你,所有的答案都非常有幫助的笑 – Scott 2012-07-24 01:07:22