我有一个来自MongoDB的对象:
var result = await dbFind.searchSongs({'name':searchTerm}); //method executed from core module
console.log(result);
/*output:
{
"_id" : ObjectId("5a99a3bb26a4b92b3cd9f43c"),
"name" : "Bad Guy",
"artist" : "Eminem",
"song" : "1520018363067.mp3",
"mimetype" : "audio/mp3",
"views" : [ ],
"__v" : 0
}
*/
但是当我尝试访问object.property
时,我得到undefined
。发生了什么事?