nodejs+mongodb aggregate级联查询操作示例

2020-06-17 07:19:10易采站长站整理

})
});
};

返回的结果格式(这里仅有两条记录,实际为前十):


[ { _id: { customerId: 559a5b6f51a446602032fs21 }, number: 5,
customerName: 'test2',
mobile:22 } ,
{ _id: { customerId: 559a5b6f51a446602041ee6f }, number: 1,
customerName: 'test1',
mobile: 11 } ]

希望本文所述对大家nodejs程序设计有所帮助。