Answers for "comparing mongoose ids and strings"

2

compare mongoose id

user._id.toString() === request.params.id
Posted by: Guest on August-10-2020
0

comparing mongoose ids and strings

// use .equals()

first._id.equals(another._id)
Posted by: Guest on November-20-2020

Code answers related to "comparing mongoose ids and strings"

Browse Popular Code Answers by Language