これは初歩的な質問かもしれませんが、アイテムの JSON リストを (nodejs アプリで) 作成したい場合は、次のようにします。
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'} }