{
"name": "comments",
"rid": 456,
"refs": [
{
"no": 1,
"info": "this is first"
},
{
"no": 2,
"info": "this is second"
},
{
"no": 3,
"info": "this is third"
}
]
}
{
"name": "comments",
"rid": 321,
"refs": [
{
"no": 1,
"info": "this is first-h"
},
{
"no": 2,
"info": "this is second-h"
},
{
"no": 3,
"info": "this is third-h"
}
]
}
假设我有一个像上面这样的文档结构。我需要得到 rid 为 456 而 no 为 2 的数组。所以,我只想得到数组
{
"no": 2,
"info": "this is second"
}
我怎么能那样做?