Mongodb – How to resolve promise in if statement?
I have an array of objects as: { id: '1582715', email: '[email protected]', isUsed: false }, and I have many documents in MongoDB with same keys. Before writing new array of objects in BD, I want to check does objects of…