I like to to go find a user in mongoDb by looking for a user called value. The problem with:
username: \'peter\'
is that i dont find it if
if I want to query all record at some condition,I can use this:
if (userId == 'admin') userId = {'$regex': '.*.*'}; User.where('status', 1).where('creator', userId);