假设我有一个代表这样的书籍的文档:
{
"_id":"1234567890",
"title":"Lord Of The Rings",
"books": {
"1234567890":{
"_id":"123456789890",
"title":"The Two Towers",
"page_count":{
"en":6000,
"de":7000
}
},
"2234567890":{
"_id":"223456789890",
"title":"The Return Of The King",
"page_count":{
"en":6000,
"de":7000
}
},
}
}
我将如何删除第二本书的页数?我试过
{$unset : {"books.2234567890.page_count":""}}
没用。有任何想法吗?
非常感谢