how to compare objectid in mongodb with string code example Example: compare mongoose id user._id.toString() === request.params.id