node js with mongoose comparing document ids code example Example: compare mongoose id user._id.toString() === request.params.id