I use query such as:
db.users.find({}).projection({"_id":0,"email":1,"name.fullName":1})
Which returns me output such as:
{
"email" : "foo@example.bar",
"name" : {
"fullName" : "Foo Bar"
}
}
I am trying to convert such object to be:
{
"email" : "foo@example.bar",
"name" : "Foo Bar"
}