有没有办法获取infos
个对象的不同键?换句话说,列表['lastname', 'firstname', 'birthday', 'city']
/* QUERY */
db.users.find({})
/* 1 */
{
"_id" : "ee4068dbbe0005ed23249f38ce691665",
"infos" : {
"lastname" : "MATOUB",
"firstname" : "Lounes"
},
}
/* 2 */
{
"_id" : "0005ed232ee4068dbbe49f38ce6968db",
"infos" : {
"birthday": "19560312",
"lastname" : "DOMRANE",
"firstname" : "Malika"
},
}
/* 3 */
{
"_id" : "68dbbe49f38e4068dbbe49f38ce69384",
"infos" : {
"lastname" : "AZEM",
"firstname" : "Slimane",
"city": "Tizi Ouzou"
},
}