I have a collection like this, I need to unwind "myuser" object.
{"_id" : ObjectId("578508630420bec15ea9876c"),
"current" : "selectCategory",
"myuser" : {
"_id" : "56c49c540d9e391243ce2752",
"myoptions" : [
{
"id" : "jobs",
"name" : "Emploi"
}
],
"mychannel" : "ussd",
"mycreateDate" : "2016-02-17T16:14:12.899Z",
"myemail" : "",
"mygender" : "",
"myhidemsisdn" : "no",
"mylang" : "fr",
"mylastUpdate" : "2016-02-26T11:32:29.786Z",
"myyob" : -1
},
"userInput" : "continue",
"ussdsession" : "303819320" }
I'm looking for a output like myuser :
["_id","myoptions","mychannel","mycreatedate","myemail","mygender","myhidemsisdn","mylang","mylastupdate","myyob"]
I can get the keys of the collection.But myuser is a nested object which has keys.Thanks in advance