i'm working with nodejs server using mongoDB. Now i have a sample data:
{
"_id": ObjectId("555f1c0c7f4b820758b439b0"),
"user": "Guest1",
"friend": [{
"myfriend": "Guest2",
"info": []
}, {
"myfriend": "Guest3",
"info": []
}]
}
Now i want to put all "myfriend" into array, like this:
var listfriend = ["Guest2","Guest3"];
So how can i do it ?
Thank for read :)