以下是文档:
{
"name": "Micheal",
"title": "appliaction engeneer",
"age": 30,
"interest": "java",
"manager": "Amily"
},
{
"name": "Georgiana",
"title": "appliaction engeneer",
"age": 34,
"interest": "java",
"manager": "Amily"
},
{
"name": "Benjamin",
"title": "Product Manager",
"age": 36,
"interest": "management",
"manager": "robinson "
},
{
"name": "Selina",
"title": "appliaction engeneer",
"age": 30,
"interest": "java",
"manager": "Grey "
},
{
"name": "Edison",
"title": "appliaction engeneer",
"age": 26,
"interest": ".net",
"manager": "Amily "
}
现在我需要从文档中精确提取三个字段title, age, interest
。
结果应类似于:
{
"title": "appliaction engeneer",
"age": 30,
"interest": "java",
},
{
"title": "appliaction engeneer",
"age": 34,
"interest": "java",
},
{
"title": "Product Manager",
"age": 36,
"interest": "management",
},
{
"title": "appliaction engeneer",
"age": 26,
"interest": ".net",
}
重复记录中的一条,如下面一条,应删除。
{
"title": "appliaction engeneer",
"age": 30,
"interest": "java"
}
最重要的是,获取的记录的顺序应与文档一致。
我们如何实现这一目标?