我的收藏包含以下文件:
{
"_id": ObjectId("585a7886e4b06aec5d1d1639"),
"name": "somename",
"owner": "someowner",
"slots": 50,
"gold": 0,
"tag": "sometext",
"motd": "sometext",
"purchases": [],
"members": {
"membername1": {
"rank": 2
},
"membername2": {
"rank": 5
},
"membername3": {
"rank": 3
}
}
}
我需要从" members.membername.rank"获取int值。 如何只知道membername?
,我如何得到这个值?答案 0 :(得分:0)
以下代码排除了文档的ID,仅获取rank
的{{1}}
memername1