Open wideweide opened 5 years ago
How to get count directly?
people.find({ name: { $regex: /Todd/ } }).toArray().then(res => console.log(res.length)).catch(err =>console.log(err))
may be add count support? people.count({ name: { $regex: /Todd/ } }).then(res => console.log(res)).catch(err =>console.log(err))
How to get count directly?
people.find({ name: { $regex: /Todd/ } }).toArray().then(res => console.log(res.length)).catch(err =>console.log(err))
may be add count support? people.count({ name: { $regex: /Todd/ } }).then(res => console.log(res)).catch(err =>console.log(err))